84% wp-easy-toggles

Code Review | WP Easy Toggles

WordPress plugin WP Easy Toggles scored84%from 54 tests.

About plugin

  • Plugin page: wp-easy-toggles
  • Plugin version: 1.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Feb 6, 2018
  • Latest release: Dec 5, 2022
  • Number of updates: 40
  • Update frequency: every 44.1 days
  • Top authors: husainahmedqureshi (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /3,267 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.21ms] Passed 4 tests

A check of server-side resources used by WP Easy Toggles
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.57 ▼10.03
Dashboard /wp-admin3.31 ▲0.0150.83 ▼2.31
Posts /wp-admin/edit.php3.36 ▲0.0046.88 ▼5.62
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.93 ▲1.45
Media Library /wp-admin/upload.php3.23 ▲0.0035.97 ▲1.14
WP Easy Toggles /wp-admin/options-general.php?page=haqwpet-settings3.2029.42

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WP Easy Toggles
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6414.25 ▼0.132.36 ▲0.6440.10 ▼5.19
Dashboard /wp-admin2,196 ▲195.57 ▼0.1583.08 ▼26.5343.63 ▼9.58
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0533.03 ▼9.8135.21 ▼1.26
Add New Post /wp-admin/post-new.php1,557 ▲1718.41 ▼4.54608.24 ▲2.5753.31 ▲7.95
Media Library /wp-admin/upload.php1,404 ▲44.27 ▲0.01100.82 ▼1.0748.28 ▲3.61
WP Easy Toggles /wp-admin/options-general.php?page=haqwpet-settings7881.9833.5134.38

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-easy-toggles/wp-easy-toggles.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: widgets toggle, wysiwyg editor toggle, toggles, shortcode toggle

wp-easy-toggles/wp-easy-toggles.php Passed 13 tests

The principal PHP file in "WP Easy Toggles" v. 1.5.0 is loaded by WordPress automatically on each request
62 characters long description:
WP Easy Toggles plugin add toggle functionality on your theme.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin81 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15941
CSS13240

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.08
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/togal-plus.png0.50KB0.62KB0.00%
assets/togal-minus.png0.48KB0.61KB0.00%