74% maimenu

Code Review | Maimenu for Restaurant Menus Plugin

WordPress plugin Maimenu for Restaurant Menus Plugin scored 74% from 54 tests.

About plugin

  • Plugin page: maimenu
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.0-3.1.2
  • WordPress version: 6.3.1
  • First release: Aug 15, 2013
  • Latest release: Aug 15, 2013
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: grethel (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,902 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Maimenu for Restaurant Menus Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.24 ▼1.44
Dashboard /wp-admin3.00 ▼0.3122.02 ▼26.41
Posts /wp-admin/edit.php3.00 ▼0.3622.86 ▼28.17
Add New Post /wp-admin/post-new.php3.00 ▼2.8923.69 ▼86.85
Media Library /wp-admin/upload.php3.00 ▼0.2324.05 ▼10.07

Server storage [IO: ▲0.47MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Maimenu for Restaurant Menus Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲8013.23 ▼1.131.73 ▼0.2143.08 ▼0.66
Dashboard /wp-admin2,224 ▲504.92 ▼0.9095.64 ▼6.1270.85 ▲25.22
Posts /wp-admin/edit.php2,107 ▲151.98 ▼0.0737.52 ▼1.8632.30 ▼4.53
Add New Post /wp-admin/post-new.php1,681 ▲15321.78 ▲3.21742.69 ▲123.8749.53 ▼8.96
Media Library /wp-admin/upload.php1,394 ▲124.22 ▲0.0895.40 ▼3.9268.43 ▲26.80

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > 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
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 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 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 add_action() in wp-content/plugins/maimenu/maimenu.php:148
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/maimenu/interface/view.php:2

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 93% 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
These attributes need to be fixed:
  • Tags: You are using too many tags: 16 tag instead of maximum 10
  • Screenshots: Please add images for these screenshots: #1 (Login on Maimenu.it), #2 (List of plates), #3 (Edit your menu), #4 (Copy the HTML snippet to enter into the plugin)
Please take inspiration from this readme.txt

maimenu/maimenu.php Passed 13 tests

The entry point to "Maimenu for Restaurant Menus Plugin" version 1.0 is a PHP file that has certain tags in its header comment area
82 characters long description:
FREE service for RESTAURANTS. Create your MENU easily with the shortcode [maimenu]

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
No dangerous file extensions were detected111 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP23828111
CSS1030
JavaScript1010

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods466.67%
▷ Protected methods00.00%
▷ Private methods233.33%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.46MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png151.34KB67.17KB▼ 55.61%
screenshot-4.png127.95KB52.27KB▼ 59.15%
images/icon.png1.38KB0.57KB▼ 58.40%
screenshot-1.png61.51KB34.83KB▼ 43.38%
screenshot-3.png129.38KB62.04KB▼ 52.05%