83% sv-press-permit-converter-member-groups-to-roles

Code Review | SV Press Permit Converter Member Groups to Roles

WordPress plugin SV Press Permit Converter Member Groups to Roles scored 83% from 54 tests.

About plugin

  • Plugin page: sv-press-permit-c...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 7, 2018
  • Latest release: Mar 11, 2018
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: Matthias Reuter (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 618 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.61ms] Passed 4 tests

A check of server-side resources used by SV Press Permit Converter Member Groups to Roles
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.08 ▼3.69
Dashboard /wp-admin3.36 ▲0.0645.44 ▼8.01
Posts /wp-admin/edit.php3.47 ▲0.1247.72 ▼2.70
Add New Post /wp-admin/post-new.php5.94 ▲0.0585.29 ▼12.05
Media Library /wp-admin/upload.php3.28 ▲0.0536.82 ▲3.26

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for SV Press Permit Converter Member Groups to Roles
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲8013.33 ▼0.891.81 ▲0.1140.72 ▼2.21
Dashboard /wp-admin2,224 ▲365.86 ▼0.04103.11 ▲0.3280.42 ▲40.70
Posts /wp-admin/edit.php2,104 ▲151.98 ▼0.0338.03 ▲1.3335.18 ▲1.21
Add New Post /wp-admin/post-new.php1,541 ▲2218.44 ▼4.72671.46 ▲21.4659.24 ▲3.68
Media Library /wp-admin/upload.php1,403 ▲154.22 ▲0.01105.61 ▲5.6944.30 ▼1.58

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/sv-press-permit-converter-member-groups-to-roles/sv_ppcmgtr.php:44
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/sv-press-permit-converter-member-groups-to-roles/sv_ppcmgtr.php on line 44
    • > PHP Fatal error
      Uncaught Error: Class 'sv_ppcmgtr' not found in wp-content/plugins/sv-press-permit-converter-member-groups-to-roles/lib/modules/hooks.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'sv_ppcmgtr' not found in wp-content/plugins/sv-press-permit-converter-member-groups-to-roles/lib/modules/settings.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'sv_ppcmgtr' not found in wp-content/plugins/sv-press-permit-converter-member-groups-to-roles/lib/modules/ajax.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/sv-press-permit-converter-member-groups-to-roles/lib/assets/tpl/backend.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
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 describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Donate link: Please fix this invalid URI: ""
The official readme.txt might help

sv-press-permit-converter-member-groups-to-roles/sv_ppcmgtr.php 85% from 13 tests

The entry point to "SV Press Permit Converter Member Groups to Roles" version 1.0.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("sv-press-permit-converter-member-groups-to-roles.php" instead of "sv_ppcmgtr.php")

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
Good job! No executable or dangerous file extensions detected487 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP519147266
CSS100111
PO File1222372
JavaScript111338

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity6.50
▷ Minimum class complexity2.00
▷ Maximum class complexity15.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1694.12%
▷ Protected methods00.00%
▷ Private methods15.88%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/assets/img/logo_icon.png1.34KB0.76KB▼ 43.44%
lib/assets/img/logo.png39.36KB19.37KB▼ 50.80%