84% toast-responsive-menu

Code Review | Toast Mobile Menu - PageSpeed Insights Friendly

WordPress plugin Toast Mobile Menu - PageSpeed Insights Friendly scored 84% from 54 tests.

About plugin

  • Plugin page: toast-responsive-...
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0.0-5.8
  • WordPress version: 6.3.1
  • First release: Apr 29, 2019
  • Latest release: Mar 8, 2023
  • Number of updates: 41
  • Update frequency: every 34.4 days
  • Top authors: toastwebsites (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 2,002 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼8.82ms] Passed 4 tests

An overview of server-side resources used by Toast Mobile Menu - PageSpeed Insights Friendly
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0324.69 ▼15.13
Dashboard /wp-admin3.36 ▲0.0645.89 ▼0.64
Posts /wp-admin/edit.php3.41 ▲0.0549.47 ▼3.24
Add New Post /wp-admin/post-new.php5.94 ▲0.0591.65 ▼16.26
Media Library /wp-admin/upload.php3.28 ▲0.0534.90 ▲0.82

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Toast Mobile Menu - PageSpeed Insights Friendly
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,985 ▲21413.70 ▼0.676.47 ▲4.7138.77 ▼1.71
Dashboard /wp-admin2,218 ▲444.84 ▼0.02111.02 ▼3.8339.35 ▼9.09
Posts /wp-admin/edit.php2,101 ▲121.99 ▼0.0339.85 ▼1.6035.01 ▲0.66
Add New Post /wp-admin/post-new.php1,524 ▼917.76 ▼5.62649.30 ▼7.8259.16 ▲8.31
Media Library /wp-admin/upload.php1,400 ▲124.16 ▼0.0394.72 ▼9.8639.97 ▼6.33

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/toast-responsive-menu/menu/menu.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/toast-responsive-menu/inc/functions.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/toast-responsive-menu/inc/options-page.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/toast-responsive-menu/inc/options.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/toast-responsive-menu/menu/menu.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% 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
3 plugin tags: mobile, menu, responsive

toast-responsive-menu/mobile-menu.php 92% from 13 tests

"Toast Mobile Menu - PageSpeed Insights Friendly" version 1.0.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("toast-responsive-menu.php" instead of "mobile-menu.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin685 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP52730286
CSS24723264
JavaScript23020132
SVG3003

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions11
▷ Named functions11100.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.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/toastplugins.png5.91KB2.69KB▼ 54.48%