73% menus-history

Code Review | Menus History

WordPress plugin Menus History scored73%from 54 tests.

About plugin

  • Plugin page: menus-history
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2.2
  • WordPress version: 6.3.1
  • First release: Dec 30, 2013
  • Latest release: May 24, 2015
  • Number of updates: 23
  • Update frequency: every 22.2 days
  • Top authors: binarystash01 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,931 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 successfully, without throwing any errors or notices

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

Server-side resources used by Menus History
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.48 ▼4.11
Dashboard /wp-admin3.33 ▼0.0148.68 ▼17.35
Posts /wp-admin/edit.php3.38 ▲0.0348.04 ▲0.17
Add New Post /wp-admin/post-new.php5.93 ▲0.0596.93 ▲5.52
Media Library /wp-admin/upload.php3.25 ▲0.0338.75 ▼4.80
Menus History /wp-admin/tools.php?page=menus-history3.2529.27

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Menus History
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲5214.31 ▼0.041.84 ▼0.0143.88 ▲2.02
Dashboard /wp-admin2,204 ▲275.68 ▼0.08106.47 ▲4.8944.85 ▼1.59
Posts /wp-admin/edit.php2,112 ▲122.03 ▲0.0040.53 ▲3.6333.94 ▼5.56
Add New Post /wp-admin/post-new.php1,533 ▼14723.21 ▲1.21666.43 ▲18.1166.91 ▲2.00
Media Library /wp-admin/upload.php1,406 ▲124.34 ▲0.06106.63 ▲6.8646.76 ▲3.45
Menus History /wp-admin/tools.php?page=menus-history8092.1131.1027.77

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=menus-history
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/menus-history/classes/class-menus-history-controller.php+48
    Undefined index: term_id

SRP 0% 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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/menus-history/views/admin-page.php
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/menus-history/menus-history.php:16
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/menus-history/views/admin-page.php on line 8
    • > PHP Notice
      Undefined variable: my_menus in wp-content/plugins/menus-history/views/admin-page.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/menus-history/classes/class-menus-history-nav-walker.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/menus-history/views/revisions.php:1
    • > PHP Notice
      Undefined variable: revisions in wp-content/plugins/menus-history/views/revisions.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: menu revisions, menus, menu revision, menus history, menu history

menus-history/menus-history.php Passed 13 tests

The primary PHP file in "Menus History" version 1.0.2 is used by WordPress to initiate all plugin functionality
46 characters long description:
Provides history of changes to Wordpress menus

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
Success! There were no dangerous files found in this plugin247 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP56723152
CSS112065
JavaScript17030

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity6.50
▷ Minimum class complexity4.00
▷ Maximum class complexity9.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin