90% correct-horse-battery-staple

Code Review | Correct Horse Battery Staple

WordPress plugin Correct Horse Battery Staple scored90%from 54 tests.

About plugin

  • Plugin page: correct-horse-bat...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.5-6.1
  • WordPress version: 6.3.1
  • First release: Apr 9, 2017
  • Latest release: Nov 4, 2022
  • Number of updates: 18
  • Update frequency: every 113.1 days
  • Top authors: numeeja (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,167 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.43ms] Passed 4 tests

An overview of server-side resources used by Correct Horse Battery Staple
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.12 ▼3.98
Dashboard /wp-admin3.32 ▲0.0253.28 ▲2.07
Posts /wp-admin/edit.php3.37 ▲0.0249.27 ▲1.79
Add New Post /wp-admin/post-new.php5.90 ▲0.0289.21 ▼17.48
Media Library /wp-admin/upload.php3.24 ▲0.0136.49 ▲1.94

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Correct Horse Battery Staple
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.24 ▼1.141.81 ▲0.1340.69 ▼1.70
Dashboard /wp-admin2,203 ▲125.79 ▲0.76106.14 ▲2.2938.90 ▼1.79
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.1238.10 ▼0.8735.50 ▼0.02
Add New Post /wp-admin/post-new.php1,537 ▲323.41 ▲0.19644.87 ▼23.1449.63 ▼0.12
Media Library /wp-admin/upload.php1,385 ▼34.27 ▲0.0592.44 ▼25.5641.52 ▼8.06

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: user, xkcd, memorable, password

correct-horse-battery-staple/correct-horse-battery-staple.php Passed 13 tests

"Correct Horse Battery Staple" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
37 characters long description:
Generates XKCD style strong passwords

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected84 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5335184

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin