83% upper-menu-for-twenty-eleven

Code Review | Upper Menu for Twenty Eleven

WordPress plugin Upper Menu for Twenty Eleven scored83%from 54 tests.

About plugin

  • Plugin page: upper-menu-for-tw...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2+
  • WordPress version: 6.3.1
  • First release: Feb 2, 2012
  • Latest release: Feb 2, 2012
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: bi0xid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /3,554 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼0.95ms] Passed 4 tests

An overview of server-side resources used by Upper Menu for Twenty Eleven
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.61 ▼2.59
Dashboard /wp-admin3.31 ▲0.0048.89 ▲1.42
Posts /wp-admin/edit.php3.36 ▲0.0049.18 ▲0.35
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.94 ▼3.00
Media Library /wp-admin/upload.php3.23 ▲0.0037.12 ▲3.14

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Upper Menu for Twenty Eleven
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4513.15 ▼1.214.70 ▲2.7742.84 ▼1.01
Dashboard /wp-admin2,206 ▲155.90 ▲0.99109.07 ▲8.7644.90 ▲0.24
Posts /wp-admin/edit.php2,092 ▲32.01 ▼0.0341.46 ▲1.5936.01 ▼0.66
Add New Post /wp-admin/post-new.php1,537 ▼523.42 ▲5.34671.09 ▲51.7854.45 ▼1.43
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.0496.35 ▼6.7441.58 ▲0.80

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

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
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/upper-menu-for-twenty-eleven/upper-menu.php:30

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

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tested up to: Version not formatted correctly
  • Screenshots: Add an image for screenshot #1 (An example of the final result after activating the plugin.)
You can take inspiration from this readme.txt

upper-menu-for-twenty-eleven/upper-menu.php 92% from 13 tests

The main PHP script in "Upper Menu for Twenty Eleven" version 0.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("upper-menu-for-twenty-eleven.php" instead of "upper-menu.php")

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
Everything looks great! No dangerous files found in this plugin46 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
CSS11039
PHP18227

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.10MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png105.35KB33.95KB▼ 67.77%