84% meal-planner

Code Review | Meal Planner Plugin

WordPress plugin Meal Planner Plugin scored84%from 54 tests.

About plugin

  • Plugin page: meal-planner
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Jun 8, 2016
  • Latest release: Jun 8, 2016
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: webdesksolution (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,392 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.16MB] [CPU: ▼7.20ms] Passed 4 tests

Analyzing server-side resources used by Meal Planner Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1748.20 ▲4.88
Dashboard /wp-admin3.47 ▲0.1351.16 ▼15.60
Posts /wp-admin/edit.php3.58 ▲0.2351.69 ▲1.87
Add New Post /wp-admin/post-new.php6.06 ▲0.1787.37 ▼19.93
Media Library /wp-admin/upload.php3.39 ▲0.1640.74 ▲6.37

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Meal Planner Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,933 ▲16213.48 ▼0.8610.88 ▲8.6644.24 ▼0.47
Dashboard /wp-admin2,195 ▲215.55 ▼0.0488.22 ▼16.7240.47 ▼2.39
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0035.48 ▲1.3834.40 ▼4.23
Add New Post /wp-admin/post-new.php1,536 ▲822.96 ▼0.29663.49 ▼40.9353.80 ▼0.23
Media Library /wp-admin/upload.php1,400 ▼04.19 ▲0.05108.10 ▼5.9949.31 ▼0.31

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/meal-planner/wds_meta_box.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/meal-planner/meal-planner.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/meal-planner/wds_woofunction.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
4 plugin tags: planner, woocommerce, meal, customizer

meal-planner/meal-planner.php Passed 13 tests

"Meal Planner Plugin" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
125 characters long description:
This plugin helps you to create the Meal packages that will allow users to purchase the meal plans as per their requirements.

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 plugin2,286 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS239511,289
PHP321358876
JavaScript15311121

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity7.40
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
8 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/inner-icon.png3.19KB3.20KB0.00%
css/image/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
css/image/ui-icons_444444_256x240.png6.83KB4.17KB▼ 38.86%
css/image/ui-icons_cc0000_256x240.png4.44KB4.17KB▼ 6.02%
css/image/ui-icons_777777_256x240.png6.83KB4.17KB▼ 38.92%