84% demo-user-dzs-showcase-your-admin-safely

Code Review | Demo User DZS - Showcase your admin safely

WordPress plugin Demo User DZS - Showcase your admin safely scored84%from 54 tests.

About plugin

  • Plugin page: demo-user-dzs-sho...
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-5.7
  • WordPress version: 6.3.1
  • First release: Apr 29, 2021
  • Latest release: Apr 29, 2021
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: digitalzoomstudio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /353 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.02MB] [CPU: ▼2.93ms] Passed 4 tests

Server-side resources used by Demo User DZS - Showcase your admin safely
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0245.90 ▼7.17
Dashboard /wp-admin3.32 ▲0.0255.14 ▲3.27
Posts /wp-admin/edit.php3.44 ▲0.0851.26 ▼0.13
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.34 ▼2.91
Media Library /wp-admin/upload.php3.25 ▲0.0239.13 ▼1.52

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Demo User DZS - Showcase your admin safely
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.35 ▼0.001.84 ▼0.1343.75 ▲1.44
Dashboard /wp-admin2,210 ▲305.59 ▲0.0186.07 ▼14.7942.30 ▼14.64
Posts /wp-admin/edit.php2,112 ▲122.03 ▲0.0234.66 ▼7.0032.28 ▼4.15
Add New Post /wp-admin/post-new.php1,538 ▲1023.00 ▼0.06674.67 ▼7.9060.60 ▲9.45
Media Library /wp-admin/upload.php1,412 ▲94.26 ▲0.0598.92 ▼5.7044.99 ▼0.51

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
The following issues need your attention
  • 19× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant DZSDMU_BASE_PATH - assumed 'DZSDMU_BASE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/demo-user-dzs-showcase-your-admin-safely/demo_user.php on line 17
    • > PHP Warning
      include_once(DZSDMU_BASE_PATHinc/php/DzsDmuAjax.php): failed to open stream: No such file or directory in wp-content/plugins/demo-user-dzs-showcase-your-admin-safely/DzsDemoUser.php on line 5
    • > PHP Warning
      include_once(): Failed opening 'DZSDMU_BASE_PATHinc/php/DzsDmuAjax.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/demo-user-dzs-showcase-your-admin-safely/DzsDemoUser.php on line 5
    • > PHP Warning
      include_once(DZSDMU_BASE_PATHinc/php/DzsDmuAdmin.php): failed to open stream: No such file or directory in wp-content/plugins/demo-user-dzs-showcase-your-admin-safely/DzsDemoUser.php on line 4
    • > PHP Warning
      include_once(): Failed opening 'DZSDMU_BASE_PATHinc/php/DzsDmuAdmin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/demo-user-dzs-showcase-your-admin-safely/DzsDemoUser.php on line 4
    • > PHP Warning
      include_once(DZSDMU_BASE_PATH/DzsDemoUser.php): failed to open stream: No such file or directory in wp-content/plugins/demo-user-dzs-showcase-your-admin-safely/demo_user.php on line 23
    • > PHP Warning
      include_once(): Failed opening 'DZSDMU_BASE_PATH/dzsCommon_functions.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/demo-user-dzs-showcase-your-admin-safely/demo_user.php on line 21
    • > PHP Warning
      Use of undefined constant DZSDMU_BASE_PATH - assumed 'DZSDMU_BASE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/demo-user-dzs-showcase-your-admin-safely/demo_user.php on line 23
    • > PHP Warning
      Use of undefined constant DZSDMU_BASE_PATH - assumed 'DZSDMU_BASE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/demo-user-dzs-showcase-your-admin-safely/demo_user.php on line 21
    • > PHP Warning
      include_once(): Failed opening 'DZSDMU_BASE_PATHconfigs/constants.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/demo-user-dzs-showcase-your-admin-safely/demo_user.php on line 16

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)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: spam, comments

demo-user-dzs-showcase-your-admin-safely/demo_user.php 92% from 13 tests

The entry point to "Demo User DZS - Showcase your admin safely" version 1.1.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("demo-user-dzs-showcase-your-admin-safely.php" instead of "demo_user.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected1,113 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP825149787
Sass3400152
CSS1164127
JavaScript420047

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity36.00
▷ Minimum class complexity7.00
▷ Maximum class complexity107.00
Average method complexity5.52
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods31
▷ Static methods1858.06%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants222.22%
▷ Class constants777.78%
▷ Public constants7100.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