84% wp-nav-collapse

Code Review | WP Nav Collapse

WordPress plugin WP Nav Collapse scored84%from 54 tests.

About plugin

  • Plugin page: wp-nav-collapse
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.4
  • WordPress version: 6.3.1
  • First release: Oct 23, 2012
  • Latest release: Oct 23, 2012
  • Number of updates: 4
  • Update frequency: every 8.5 days
  • Top authors: markparolisi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,164 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.51ms] Passed 4 tests

A check of server-side resources used by WP Nav Collapse
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0144.64 ▼1.69
Dashboard /wp-admin3.32 ▲0.0157.15 ▲8.92
Posts /wp-admin/edit.php3.37 ▲0.0150.81 ▼5.12
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.59 ▼14.88
Media Library /wp-admin/upload.php3.24 ▲0.0142.45 ▲3.66

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WP Nav Collapse
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5613.24 ▼1.501.80 ▼0.0239.72 ▼5.16
Dashboard /wp-admin2,217 ▲235.81 ▲0.93101.05 ▼11.4836.86 ▼9.82
Posts /wp-admin/edit.php2,081 ▼222.04 ▲0.0134.79 ▼4.5739.46 ▲5.68
Add New Post /wp-admin/post-new.php1,542 ▼1223.14 ▲4.90633.46 ▲2.6283.60 ▲25.37
Media Library /wp-admin/upload.php1,405 ▲84.20 ▲0.07114.16 ▲0.0148.14 ▲3.13

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-nav-collapse/wp-nav-collapse.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Donate link: Please fix this invalid url: ""
  • Tags: There were no tags found
The official readme.txt is a good inspiration

wp-nav-collapse/wp-nav-collapse.php Passed 13 tests

The main PHP file in "WP Nav Collapse" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
47 characters long description:
Add togglers to the admin view for WP Nav Menus

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin134 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CoffeeScript1121486
PHP191547
JavaScript1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods4100.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected