84% mp-automate-lite-for-mailpoet

Code Review | MP Automate Lite for MailPoet

WordPress plugin MP Automate Lite for MailPoet scored84%from 54 tests.

About plugin

  • Plugin page: mp-automate-lite-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.7
  • WordPress version: 6.3.1
  • First release: Mar 13, 2021
  • Latest release: Mar 13, 2021
  • Number of updates: 7
  • Update frequency: every 0.4 days
  • Top authors: Lucyproductionz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /960 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.33ms] Passed 4 tests

Analyzing server-side resources used by MP Automate Lite for MailPoet
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.94 ▲5.87
Dashboard /wp-admin3.32 ▼0.0348.68 ▼13.88
Posts /wp-admin/edit.php3.37 ▲0.0146.90 ▲0.82
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.38 ▼10.12
Media Library /wp-admin/upload.php3.24 ▲0.0139.96 ▲6.75

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for MP Automate Lite for MailPoet
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲4914.24 ▼0.131.64 ▲0.1244.39 ▲3.45
Dashboard /wp-admin2,201 ▲215.55 ▼0.1182.99 ▼2.0039.06 ▼2.69
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0136.58 ▼0.1035.43 ▼1.90
Add New Post /wp-admin/post-new.php1,532 ▲623.51 ▲0.51676.94 ▲74.3461.45 ▲4.00
Media Library /wp-admin/upload.php1,406 ▲34.26 ▲0.0692.13 ▼10.4744.98 ▼2.73

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 5× 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/mp-automate-lite-for-mailpoet/includes/class-mpa-lite-handler.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mp-automate-lite-for-mailpoet/templates/mpa-lite-upgrade.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mp-automate-lite-for-mailpoet/templates/mpa-lite-log.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mp-automate-lite-for-mailpoet/templates/mpa-lite-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mp-automate-lite-for-mailpoet/includes/mpa-lite-scheduler.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: multiple lists, mailpoet, manage subscribers automatically, automate subscriber management, wysija...

mp-automate-lite-for-mailpoet/mp-automate-lite.php 85% from 13 tests

"MP Automate Lite for MailPoet" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("mp-automate-lite-for-mailpoet.php" instead of "mp-automate-lite.php")

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 plugin672 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP76292515
JavaScript17481
CSS110462
PO File10014

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity26.00
▷ Minimum class complexity20.00
▷ Maximum class complexity32.00
Average method complexity5.17
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants4
▷ Global constants4100.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
PNG images were not found in this plugin