79% cool-mobile-menu

Code Review | Cool Mobile Menu

WordPress plugin Cool Mobile Menu scored79%from 54 tests.

About plugin

  • Plugin page: cool-mobile-menu
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4.2
  • WordPress version: 6.3.1
  • First release: May 13, 2016
  • Latest release: May 13, 2016
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: farvehandleren (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,072 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.94MB] [CPU: ▼31.38ms] Passed 4 tests

Analyzing server-side resources used by Cool Mobile Menu
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.00 ▼4.56
Dashboard /wp-admin3.00 ▼0.3023.88 ▼24.13
Posts /wp-admin/edit.php3.00 ▼0.3522.38 ▼25.15
Add New Post /wp-admin/post-new.php3.00 ▼2.8822.69 ▼62.75
Media Library /wp-admin/upload.php3.00 ▼0.2321.07 ▼13.47

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Cool Mobile Menu
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲6914.57 ▲0.271.87 ▼0.6342.01 ▼2.84
Dashboard /wp-admin2,224 ▲365.85 ▼0.05102.16 ▼12.5177.96 ▲33.88
Posts /wp-admin/edit.php2,110 ▲211.97 ▼0.0237.60 ▲1.3634.13 ▼3.73
Add New Post /wp-admin/post-new.php1,536 ▲2218.19 ▲0.53730.64 ▲67.5562.69 ▲13.13
Media Library /wp-admin/upload.php1,397 ▲94.25 ▲0.0899.84 ▲1.0244.34 ▲1.53

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
No output text or server-side errors detected on direct access of PHP files

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: mobile, mobile element, menu, mobile menu

cool-mobile-menu/main.php 85% from 13 tests

The primary PHP file in "Cool Mobile Menu" version 1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cool-mobile-menu.php" instead of "main.php")

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 plugin5,874 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
CSS20132,017
Sass1328241,520
LESS1328341,510
SVG100640
PHP22712187

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
(invalid) img/mobile-icon.png2.37KB0.00KB▼ 100.00%