83% foodsager-save

Code Review | FoodSager Save Plugin

WordPress plugin FoodSager Save Plugin scored83%from 54 tests.

About plugin

  • Plugin page: foodsager-save
  • Plugin version: 1.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.4
  • WordPress version: 6.3.1
  • First release: Dec 23, 2017
  • Latest release: Apr 21, 2018
  • Number of updates: 21
  • Update frequency: every 5.8 days
  • Top authors: sagiforbes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /718 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

Server-side resources used by FoodSager Save Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.16 ▲3.26
Dashboard /wp-admin3.33 ▲0.0345.81 ▼4.46
Posts /wp-admin/edit.php3.38 ▲0.0348.12 ▲6.19
Add New Post /wp-admin/post-new.php5.91 ▲0.0383.76 ▼19.24
Media Library /wp-admin/upload.php3.25 ▲0.0237.50 ▲4.39

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for FoodSager Save Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲4013.94 ▼0.412.17 ▲0.3243.12 ▲3.14
Dashboard /wp-admin2,198 ▲185.58 ▼0.0790.50 ▼4.1541.14 ▲3.68
Posts /wp-admin/edit.php2,100 ▲32.03 ▼0.0038.41 ▲3.0536.40 ▲1.91
Add New Post /wp-admin/post-new.php1,541 ▲1023.29 ▲0.26623.39 ▼18.7170.70 ▲7.00
Media Library /wp-admin/upload.php1,394 ▼34.17 ▼0.0397.75 ▲1.5445.70 ▲3.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/foodsager-save/trunk/foodsagersave.php:132
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/foodsager-save/foodsagersave.php:132

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Donate link: Please fix this invalid url: ""
You can take inspiration from this readme.txt

foodsager-save/foodsagersave.php 85% from 13 tests

Analyzing the main PHP file in "FoodSager Save Plugin" version 1.3
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("foodsager-save.php" instead of "foodsagersave.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin200 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP25424200

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.04
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin