78% postmenu

Code Review | Postmenu

WordPress plugin Postmenu scored 78% from 54 tests.

About plugin

  • Plugin page: postmenu
  • Plugin version: 1.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.8
  • WordPress version: 6.3.1
  • First release: Jun 15, 2017
  • Latest release: Jul 30, 2017
  • Number of updates: 30
  • Update frequency: every 1.5 days
  • Top authors: liontude (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

70+ active / 1,627 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.17MB] [CPU: ▼14.56ms] Passed 4 tests

This is a short check of server-side resources used by Postmenu
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3227.54 ▼14.73
Dashboard /wp-admin3.51 ▲0.2139.15 ▼13.84
Posts /wp-admin/edit.php3.59 ▲0.2436.89 ▼12.04
Add New Post /wp-admin/post-new.php5.83 ▼0.0674.84 ▼17.63
Media Library /wp-admin/upload.php3.54 ▲0.3130.44 ▼6.15
Postmenu /wp-admin/options-general.php?page=postmenu3.5031.68

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Postmenu
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,900 ▲16513.67 ▼0.655.76 ▲3.9642.21 ▼4.86
Dashboard /wp-admin2,214 ▲235.87 ▼0.0397.00 ▼11.4137.55 ▼5.61
Posts /wp-admin/edit.php2,129 ▲402.22 ▲0.1934.66 ▼0.9630.90 ▼2.55
Add New Post /wp-admin/post-new.php1,536 ▲1718.53 ▼4.53596.04 ▼80.6463.11 ▲7.71
Media Library /wp-admin/upload.php1,399 ▲84.25 ▲0.0498.99 ▼3.7341.85 ▼0.50
Postmenu /wp-admin/options-general.php?page=postmenu1,0782.0724.4630.17

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=postmenu
    • > User notice in wp-includes/functions.php+5905
    Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)

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
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-walker-nav-menu-edit.php): failed to open stream: No such file or directory in wp-content/plugins/postmenu/admin/includes/class-posmenu-walker-nav-menu-edit.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/postmenu/addons/postmenu-post-type-wpml.php:8
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/postmenu/admin/includes/class-posmenu-walker-nav-menu-edit.php on line 19
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-walker-nav-menu-edit.php' (include_path='.:/usr/share/php') in wp-content/plugins/postmenu/admin/includes/class-posmenu-walker-nav-menu-edit.php on line 19

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 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
You can take inspiration from this readme.txt

postmenu/postmenu.php 92% from 13 tests

This is the main PHP file of "Postmenu" version 1.4.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 185 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin3,855 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP204711,1102,339
JavaScript21551591,125
CSS2310332
SVG10059

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity25.08
▷ Minimum class complexity1.00
▷ Maximum class complexity114.00
Average method complexity3.86
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods101
▷ Static methods1211.88%
▷ Public methods9493.07%
▷ Protected methods10.99%
▷ Private methods65.94%
Functions10
▷ Named functions990.00%
▷ Anonymous functions110.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin