89% cc-god-user

Code Review | CC-God-User

WordPress plugin CC-God-User scored 89% from 54 tests.

About plugin

  • Plugin page: cc-god-user
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-6.1.1
  • WordPress version: 6.3.1
  • First release: Aug 16, 2018
  • Latest release: Mar 6, 2023
  • Number of updates: 4
  • Update frequency: every 416.3 days
  • Top authors: ClearcodeHQ (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 860 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by CC-God-User
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1138.96 ▼2.32
Dashboard /wp-admin3.40 ▲0.1049.00 ▲2.42
Posts /wp-admin/edit.php3.52 ▲0.1652.87 ▲5.65
Add New Post /wp-admin/post-new.php5.98 ▲0.1095.74 ▼3.75
Media Library /wp-admin/upload.php3.33 ▲0.1038.70 ▲3.41

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for CC-God-User
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.32 ▼0.974.24 ▲2.4639.53 ▼2.35
Dashboard /wp-admin2,206 ▲205.90 ▲1.0196.23 ▼11.3037.93 ▼2.23
Posts /wp-admin/edit.php2,089 ▼32.05 ▲0.0340.74 ▲0.6134.21 ▼1.37
Add New Post /wp-admin/post-new.php1,533 ▼123.32 ▲0.16615.49 ▼31.4365.15 ▼0.72
Media Library /wp-admin/upload.php1,388 ▲64.23 ▲0.0394.50 ▼7.7342.53 ▲0.60

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Looking good! No server-side errors or output on direct access of PHP files

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

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (**User Profile** - Set 'God User' capability to selected administrators.), #2 (**Users List** - Only 'God Users' can see other 'God Users' on Users List.)
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

cc-god-user/plugin.php 92% from 13 tests

"CC-God-User" version 1.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cc-god-user.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin442 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP14139147375
JSON10034
PO File13725
Markdown1508

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity7.67
▷ Minimum class complexity3.00
▷ Maximum class complexity12.00
Average method complexity2.09
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces3
Interfaces0
Traits1
Classes5
▷ Abstract classes120.00%
▷ Concrete classes480.00%
▷ Final classes00.00%
Methods39
▷ Static methods820.51%
▷ Public methods2461.54%
▷ Protected methods1538.46%
▷ Private methods00.00%
Functions5
▷ Named functions240.00%
▷ Anonymous functions360.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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.06MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png39.98KB13.92KB▼ 65.18%
screenshot-1.png21.96KB8.34KB▼ 62.04%