84% mp-user-roles-sync

Code Review | User Role Sync for MailPoet

WordPress plugin User Role Sync for MailPoet scored84%from 54 tests.

About plugin

  • Plugin page: mp-user-roles-sync
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.3-4.5.2
  • WordPress version: 6.3.1
  • First release: Jun 1, 2016
  • Latest release: Jun 2, 2016
  • Number of updates: 4
  • Update frequency: every 4.3 days
  • Top authors: netweblogic (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

70+ active /1,873 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.43ms] Passed 4 tests

A check of server-side resources used by User Role Sync for MailPoet
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.22 ▼7.60
Dashboard /wp-admin3.33 ▲0.0246.58 ▼2.83
Posts /wp-admin/edit.php3.38 ▲0.0249.48 ▼3.90
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.35 ▲0.62
Media Library /wp-admin/upload.php3.25 ▲0.0234.57 ▲2.82

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for User Role Sync for MailPoet
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.27 ▼0.101.51 ▼0.4635.25 ▼7.10
Dashboard /wp-admin2,209 ▲245.90 ▲1.0095.49 ▼22.5439.73 ▼4.98
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0440.39 ▲1.3433.86 ▼4.24
Add New Post /wp-admin/post-new.php1,533 ▲523.10 ▲4.77597.79 ▼23.3553.72 ▲4.44
Media Library /wp-admin/upload.php1,382 ▼34.20 ▼0.0298.26 ▲2.2043.14 ▼2.10

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 were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mp-user-roles-sync/mp-user-roles-sync.php:81

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: email subscription, email, autoresponder, newsletter signup, email newsletter...

mp-user-roles-sync/mp-user-roles-sync.php Passed 13 tests

This is the main PHP file of "User Role Sync for MailPoet" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
82 characters long description:
Automatically creates a MailPoet list for each user role and keeps it synchronized

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 detected192 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP21219192

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity26.00
▷ Minimum class complexity14.00
▷ Maximum class complexity38.00
Average method complexity5.55
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods11100.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
No PNG files were detected