84% azurecurve-toggle-showhide

Code Review | azurecurve Toggle Show/Hide

WordPress plugin azurecurve Toggle Show/Hide scored84%from 54 tests.

About plugin

  • Plugin page: azurecurve-toggle...
  • Plugin version: 2.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.0.99
  • WordPress version: 6.3.1
  • First release: Jun 27, 2014
  • Latest release: Oct 1, 2022
  • Number of updates: 40
  • Update frequency: every 75.5 days
  • Top authors: azurecurve (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

3,000+ active /36,454 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
Install script ran successfully

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

A check of server-side resources used by azurecurve Toggle Show/Hide
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.01 ▼1.94
Dashboard /wp-admin3.32 ▲0.0244.40 ▼9.66
Posts /wp-admin/edit.php3.37 ▲0.0256.16 ▲13.46
Add New Post /wp-admin/post-new.php5.90 ▲0.0283.48 ▼21.73
Media Library /wp-admin/upload.php3.24 ▲0.0138.19 ▲8.46
Plugins /wp-admin/admin.php?page=azc-plugin-menus3.2131.76
Toggle Show/Hide /wp-admin/admin.php?page=azc-tsh3.2133.47

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 40 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
azc_tsh_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by azurecurve Toggle Show/Hide
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,900 ▲13913.51 ▼1.088.35 ▲6.5036.36 ▼10.18
Dashboard /wp-admin2,226 ▲525.60 ▼0.0180.75 ▼20.0271.75 ▲23.58
Posts /wp-admin/edit.php2,131 ▲311.99 ▼0.0338.83 ▼4.1734.71 ▼1.96
Add New Post /wp-admin/post-new.php1,567 ▲3023.26 ▲5.18689.56 ▲74.2854.26 ▼24.01
Media Library /wp-admin/upload.php1,428 ▲284.18 ▼0.0192.99 ▼0.9177.06 ▲32.72
Plugins /wp-admin/admin.php?page=azc-plugin-menus8612.0023.6427.47
Toggle Show/Hide /wp-admin/admin.php?page=azc-tsh1,3411.6922.6342.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/azurecurve-toggle-showhide/includes/menu.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/azurecurve-toggle-showhide/includes/menu.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: wordpress, classicpress, toggle, index, showhide

azurecurve-toggle-showhide/azurecurve-toggle-showhide.php Passed 13 tests

"azurecurve Toggle Show/Hide" version 2.1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
43 characters long description:
Toggle to show or hide a section of content

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected938 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP310849872
CSS20452
JavaScript10014

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
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%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
32 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/bullet_arrow_right.png0.31KB0.23KB▼ 25.55%
images/action_forward_down.png0.47KB0.34KB▼ 26.67%
images/blue_control_play_up.png0.74KB0.71KB▼ 2.92%
images/minus.png0.08KB0.10KB0.00%
images/bullet_go_up.png0.46KB0.38KB▼ 17.58%