10% mandoo

Code Review | Mandoo Plugin

WordPress plugin Mandoo Plugin scored10%from 54 tests.

About plugin

  • Plugin page: mandoo
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.0.0
  • WordPress version: 6.3.1
  • First release: May 23, 2013
  • Latest release: Mar 13, 2016
  • Number of updates: 28
  • Update frequency: every 36.6 days
  • Top authors: mandoolabs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /838 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/mandoo/lib/mandoo_widget.class.php+7
    Methods with the same name as their class will not be constructors in a future version of PHP; Mandoo_Widget has a deprecated constructor

Server metrics [RAM: ▼1.77MB] [CPU: ▼50.98ms] Passed 4 tests

This is a short check of server-side resources used by Mandoo Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.22 ▼1.245.41 ▼32.51
Dashboard /wp-admin2.24 ▼1.066.51 ▼42.02
Posts /wp-admin/edit.php2.24 ▼1.126.21 ▼41.81
Add New Post /wp-admin/post-new.php2.24 ▼3.656.81 ▼87.58
Media Library /wp-admin/upload.php2.24 ▼0.996.12 ▼29.00
API Keys /wp-admin/admin.php?page=api_keys2.246.68
Page Form /wp-admin/admin.php?page=page_form2.246.80
User Subscribe /wp-admin/admin.php?page=user_subscribe2.247.60
Newsletter /wp-admin/admin.php?page=newsletter2.246.71
Help /wp-admin/admin.php?page=mandoo_plugins2.244.98

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_mandoo_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Mandoo Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲9914.47 ▲0.101.74 ▲0.1246.08 ▲5.36
Dashboard /wp-admin2,254 ▲775.79 ▼0.1194.28 ▼12.0537.94 ▼8.80
Posts /wp-admin/edit.php2,133 ▲442.06 ▲0.0834.41 ▼8.9635.02 ▼1.23
Add New Post /wp-admin/post-new.php1,551 ▲1817.69 ▼5.43680.95 ▲24.2052.11 ▼3.53
Media Library /wp-admin/upload.php1,433 ▲514.20 ▲0.02100.01 ▲0.8244.92 ▲0.56
API Keys /wp-admin/admin.php?page=api_keys8562.0425.8524.61
Page Form /wp-admin/admin.php?page=page_form8632.0725.0728.34
User Subscribe /wp-admin/admin.php?page=user_subscribe8242.0524.2426.18
Newsletter /wp-admin/admin.php?page=newsletter8542.0122.3126.40
Help /wp-admin/admin.php?page=mandoo_plugins8052.0524.1424.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/mandoo/lib/mandoo_widget.class.php+7
    Methods with the same name as their class will not be constructors in a future version of PHP; Mandoo_Widget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_mandoo_widget
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mandoo_plugins
    • > Deprecated in wp-content/plugins/mandoo/lib/mandoo_widget.class.php+7
    Methods with the same name as their class will not be constructors in a future version of PHP; Mandoo_Widget has a deprecated constructor
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mandoo_plugins
    • > Deprecated in wp-content/plugins/mandoo/lib/mandoo_plugin.class.php+25
    Function create_function() is deprecated
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mandoo_plugins
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Mandoo_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mandoo_plugins
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/mandoo/lib/admin/api.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/mandoo/lib/admin/help.php:3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/mandoo/lib/page_form_list_table.class.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/mandoo/lib/mandoo_widget.class.php:7
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/mandoo/lib/admin/user-subscribe.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/mandoo/lib/admin/page-form.php:3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/mandoo/lib/page_form_list_table.class.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/mandoo/lib/mandoo_widget.class.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/mandoo/lib/admin/newsletter.php:3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mandoo/lib/page_form_list_table.class.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: email marketing, marketing, newsletter, email

mandoo/mandoo.php 92% from 13 tests

The principal PHP file in "Mandoo Plugin" v. 1.1.2 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 146 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin2,975 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP101921,9162,296
PO File2130140351
JavaScript1220177
CSS1180108
HTML10736
Markdown11007

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity68.25
▷ Minimum class complexity7.00
▷ Maximum class complexity210.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods216
▷ Static methods10.46%
▷ Public methods21097.22%
▷ Protected methods00.00%
▷ Private methods62.78%
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

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.36MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png45.18KB16.82KB▼ 62.76%
screenshot-2.png77.26KB35.41KB▼ 54.16%
images/mandoo-icon.png53.92KB0.66KB▼ 98.78%
screenshot-3.png99.83KB45.95KB▼ 53.97%
images/mandoo-icon-32.png51.94KB0.69KB▼ 98.67%