84% ctrl-user-generator

Code Review | CTRL User Generator

WordPress plugin CTRL User Generator scored84%from 54 tests.

About plugin

  • Plugin page: ctrl-user-generator
  • Plugin version: 0.7.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: May 28, 2016
  • Latest release: Jan 31, 2017
  • Number of updates: 11
  • Update frequency: every 22.6 days
  • Top authors: willemdumee (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,329 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.32ms] Passed 4 tests

An overview of server-side resources used by CTRL User Generator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0444.00 ▲2.83
Dashboard /wp-admin3.35 ▲0.0548.78 ▼5.90
Posts /wp-admin/edit.php3.46 ▲0.1146.80 ▲0.30
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.96 ▼22.49
Media Library /wp-admin/upload.php3.27 ▲0.0437.38 ▼1.17

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by CTRL User Generator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲7214.73 ▲0.542.54 ▲0.7545.41 ▼1.00
Dashboard /wp-admin2,214 ▲375.59 ▼0.0684.72 ▼5.2742.09 ▲1.36
Posts /wp-admin/edit.php2,119 ▲192.03 ▼0.0237.01 ▲1.1041.28 ▲6.37
Add New Post /wp-admin/post-new.php1,542 ▲1117.85 ▼5.43656.05 ▼18.3571.54 ▲22.39
Media Library /wp-admin/upload.php1,413 ▲104.35 ▲0.1198.46 ▼4.5045.18 ▲0.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • 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
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ctrl-user-generator/templates/user-generator-page.php:2

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 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === ctrl-user-generator === )
The official readme.txt is a good inspiration

ctrl-user-generator/ctrl-user-generator.php Passed 13 tests

"CTRL User Generator" version 0.7.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
73 characters long description:
Easily generate new - fake - users to test your plugin / theme of website

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 detected511 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP793286254
JSON200208
PO File1121249

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.52
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods1565.22%
▷ Protected methods00.00%
▷ Private methods834.78%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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