73% easy-csv-restaurant-menus

Code Review | Food Lister

WordPress plugin Food Lister scored73%from 54 tests.

About plugin

  • Plugin page: easy-csv-restaura...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.3
  • WordPress version: 6.3.1
  • First release: Jul 8, 2016
  • Latest release: Jul 8, 2016
  • Number of updates: 12
  • Update frequency: every 0.1 days
  • Top authors: thelettuce (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,143 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼1.16MB] [CPU: ▼54.01ms] Passed 4 tests

Server-side resources used by Food Lister
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.82 ▼0.6414.37 ▼33.70
Dashboard /wp-admin2.86 ▼0.4916.95 ▼54.87
Posts /wp-admin/edit.php2.86 ▼0.5017.89 ▼32.92
Add New Post /wp-admin/post-new.php2.86 ▼3.0315.04 ▼94.55
Media Library /wp-admin/upload.php2.86 ▼0.3718.14 ▼18.99

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Food Lister
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,040 ▲27914.98 ▲0.395.88 ▲4.1241.06 ▼3.12
Dashboard /wp-admin2,363 ▲1866.24 ▲0.53116.48 ▲19.2499.01 ▲54.81
Posts /wp-admin/edit.php2,288 ▲1883.42 ▲1.3947.17 ▲2.8470.78 ▲34.32
Add New Post /wp-admin/post-new.php1,709 ▲17422.05 ▼3.27582.45 ▼54.3829.20 ▼38.62
Media Library /wp-admin/upload.php1,431 ▲314.22 ▲0.0591.62 ▼5.3985.34 ▲40.65

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/easy-csv-restaurant-menus/food_lister.php+648
    Undefined index: food_lister_check_nonce
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/easy-csv-restaurant-menus/food_lister.php:27

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

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === easy-csv-restaurant-menus === )
You can look at the official readme.txt

easy-csv-restaurant-menus/food_lister.php 85% from 13 tests

The main file in "Food Lister" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("easy-csv-restaurant-menus.php" instead of "food_lister.php")
  • Description: The description should be shorter than 140 characters (currently 197 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected1,020 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP112693470
CSS35165422
JavaScript2178128

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions19
▷ Named functions1894.74%
▷ Anonymous functions15.26%
Constants0
▷ Global constants00.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
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
images/food_lister_icon.png0.27KB0.14KB▼ 50.00%