84% waj-admin-menu

Code Review | WAJ Admin Menu

WordPress plugin WAJ Admin Menu scored84%from 54 tests.

About plugin

  • Plugin page: waj-admin-menu
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-5.2
  • WordPress version: 6.3.1
  • First release: Nov 23, 2018
  • Latest release: May 8, 2019
  • Number of updates: 9
  • Update frequency: every 18.6 days
  • Top authors: waughjai (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /739 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.51ms] Passed 4 tests

Analyzing server-side resources used by WAJ Admin Menu
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.10 ▼1.93
Dashboard /wp-admin3.38 ▲0.0850.88 ▼2.63
Posts /wp-admin/edit.php3.49 ▲0.1349.88 ▼0.38
Add New Post /wp-admin/post-new.php5.96 ▲0.0791.73 ▼5.09
Media Library /wp-admin/upload.php3.30 ▲0.0735.46 ▲2.39

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 69 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WAJ Admin Menu
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.65 ▼0.741.75 ▼0.3841.32 ▼7.19
Dashboard /wp-admin2,203 ▲295.76 ▼0.15138.61 ▲21.6776.91 ▲31.90
Posts /wp-admin/edit.php2,089 ▼32.05 ▲0.0240.69 ▲1.4136.10 ▲0.61
Add New Post /wp-admin/post-new.php1,514 ▼017.70 ▼0.22660.77 ▼33.8455.40 ▲0.94
Media Library /wp-admin/upload.php1,382 ▼64.23 ▼0.0296.89 ▼7.8141.64 ▼2.21

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-admin-menu/vendor/waughj/html-attribute/tests/HTMLAttributeTest.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WaughJ\\WAJAdminMenu\\add_shortcode() in wp-content/plugins/waj-admin-menu/waj-admin-menu.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-admin-menu/vendor/waughj/wp-admin-menu-manager/tests/WPAdminMenuManagerTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-admin-menu/vendor/waughj/html-attribute-list/tests/HTMLAttributeListTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-admin-menu/vendor/waughj/html-link/tests/HTMLLinkTest.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-admin-menu/vendor/waughj/wp-admin-menu/tests/WPAdminMenuTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-admin-menu/vendor/waughj/wp-post-list-converter/tests/WPPostListConverterTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-admin-menu/vendor/waughj/test-hash-item/tests/TestHashItemTest.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

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
4 plugin tags: nav, html, admin menu, autogenerate

waj-admin-menu/waj-admin-menu.php Passed 13 tests

The entry point to "WAJ Admin Menu" version 1.2.1 is a PHP file that has certain tags in its header comment area
87 characters long description:
Simple plugin for automatically generating HTML content from menus created in WP admin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected2,549 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
PHP273102281,941
JSON900531
Markdown731065
XML10012

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.23
Average class complexity7.60
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity1.85
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces9
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods158
▷ Static methods2213.92%
▷ Public methods12377.85%
▷ Protected methods00.00%
▷ Private methods3522.15%
Functions29
▷ Named functions2172.41%
▷ Anonymous functions827.59%
Constants16
▷ Global constants00.00%
▷ Class constants16100.00%
▷ Public constants16100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin