79% page-specific-menu-items

Code Review | Page Specific Menu Items

WordPress plugin Page Specific Menu Items scored79%from 54 tests.

About plugin

  • Plugin page: page-specific-men...
  • Plugin version: 1.6.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.5
  • WordPress version: 6.3.1
  • First release: Jan 27, 2014
  • Latest release: Apr 18, 2016
  • Number of updates: 37
  • Update frequency: every 22.0 days
  • Top authors: dharmapoudel (100%)

Code review

54 tests

User reviews

53 reviews

Install metrics

5,000+ active /105,087 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
This plugin's installer ran successfully

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

A check of server-side resources used by Page Specific Menu Items
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0541.92 ▼10.36
Dashboard /wp-admin3.38 ▲0.0748.35 ▼2.02
Posts /wp-admin/edit.php3.43 ▲0.0747.55 ▼7.65
Add New Post /wp-admin/post-new.php5.98 ▲0.0992.57 ▼2.59
Media Library /wp-admin/upload.php3.30 ▲0.0738.35 ▲0.24
PS MenuItems /wp-admin/options-general.php?page=psmi-setting-admin3.2533.16

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
psmi_defaults
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Page Specific Menu Items: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲1314.27 ▲0.062.02 ▲0.0542.97 ▲1.60
Dashboard /wp-admin2,200 ▲205.66 ▼0.0196.37 ▲5.1640.65 ▼2.40
Posts /wp-admin/edit.php2,111 ▲82.17 ▲0.0340.04 ▼2.6134.84 ▼4.96
Add New Post /wp-admin/post-new.php1,533 ▼423.02 ▲4.90675.06 ▲50.6359.03 ▼6.67
Media Library /wp-admin/upload.php1,402 ▲54.21 ▲0.1396.68 ▼11.7742.65 ▼1.15
PS MenuItems /wp-admin/options-general.php?page=psmi-setting-admin8352.0225.3526.30

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 did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • psmi_defaults
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=psmi-setting-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=psmi-setting-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/page-specific-menu-items/trunk/page-specific-menu-items.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/page-specific-menu-items/page-specific-menu-items.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: page specific menu items, page wise menu, post wise menu, menu items, menu...

page-specific-menu-items/page-specific-menu-items.php Passed 13 tests

The entry point to "Page Specific Menu Items" version 1.6.5 is a PHP file that has certain tags in its header comment area
54 characters long description:
This plugin allows you to select menu items page wise.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin254 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP18979220
JavaScript15524
CSS10210

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity37.00
▷ Minimum class complexity37.00
▷ Maximum class complexity37.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods36
▷ Static methods411.11%
▷ Public methods36100.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

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin