72% cyberactive-dmv-traffic-school

Code Review | CyberActive School

WordPress plugin CyberActive School scored72%from 54 tests.

About plugin

  • Plugin page: cyberactive-dmv-t...
  • Plugin version: 2.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.9.1
  • WordPress version: 6.3.1
  • First release: Nov 14, 2017
  • Latest release: Aug 14, 2018
  • Number of updates: 44
  • Update frequency: every 6.2 days
  • Top authors: cyberactiveinc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,049 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▼5.57ms] Passed 4 tests

This is a short check of server-side resources used by CyberActive School
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2536.76 ▼5.49
Dashboard /wp-admin3.56 ▲0.2252.14 ▼12.57
Posts /wp-admin/edit.php3.67 ▲0.3252.15 ▼1.89
Add New Post /wp-admin/post-new.php6.15 ▲0.26111.78 ▼1.61
Media Library /wp-admin/upload.php3.48 ▲0.2636.51 ▼2.34
Traffic Schools /wp-admin/edit.php?post_type=courseform3.5844.95
Add New Step /wp-admin/post-new.php?post_type=courseform3.5558.62
Traffic School /wp-admin/options-general.php?page=traffic-school3.5143.23

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 99 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for CyberActive School
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲5214.69 ▲0.332.01 ▲0.0241.07 ▼7.54
Dashboard /wp-admin2,229 ▲495.61 ▼0.0591.70 ▲2.9244.81 ▼2.11
Posts /wp-admin/edit.php2,131 ▲311.96 ▼0.0340.72 ▼2.6638.41 ▼1.45
Add New Post /wp-admin/post-new.php1,551 ▲2322.64 ▼0.33669.14 ▲4.7960.21 ▲9.22
Media Library /wp-admin/upload.php1,434 ▲344.19 ▲0.0198.62 ▼10.3545.46 ▼4.29
Traffic Schools /wp-admin/edit.php?post_type=courseform1,9372.0033.0532.19
Add New Step /wp-admin/post-new.php?post_type=courseform2,2627.59173.8061.76
Traffic School /wp-admin/options-general.php?page=traffic-school1,3582.1824.3545.63

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

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=traffic-school
    • > Notice in wp-content/plugins/cyberactive-dmv-traffic-school/inc/functions.php+11
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/post-new.php?post_type=courseform
    • > Warning in wp-content/plugins/cyberactive-dmv-traffic-school/inc/metaboxes.php+41
    count(): Parameter must be an array or an object that implements Countable

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/cyberactive-dmv-traffic-school/trunk/traffic-school.php
    • > /wp-content/plugins/cyberactive-dmv-traffic-school/traffic-school.php
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cyberactive-dmv-traffic-school/trunk/tpls/courses-selection.tpl.php:13
    • > PHP Notice
      Undefined index: src in wp-content/plugins/cyberactive-dmv-traffic-school/tpls/courses-selection.tpl.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cyberactive-dmv-traffic-school/tpls/courses-selection.tpl.php:13
    • > PHP Notice
      Undefined index: st in wp-content/plugins/cyberactive-dmv-traffic-school/trunk/tpls/courses-selection.tpl.php on line 4
    • > PHP Notice
      Undefined index: st in wp-content/plugins/cyberactive-dmv-traffic-school/tpls/courses-selection.tpl.php on line 4
    • > PHP Notice
      Undefined index: src in wp-content/plugins/cyberactive-dmv-traffic-school/trunk/tpls/courses-selection.tpl.php on line 9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Contributors: The plugin contributors field is missing
Please take inspiration from this readme.txt

cyberactive-dmv-traffic-school/traffic-school.php 92% from 13 tests

The main PHP file in "CyberActive School" ver. 2.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cyberactive-dmv-traffic-school.php" instead of "traffic-school.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
Good job! No executable or dangerous file extensions detected6,957 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions100100.00%
▷ Anonymous functions00.00%
▷ Global constants14100.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
19 PNG files occupy 0.27MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/image1.png30.29KB10.37KB▼ 65.76%
trunk/images/image3.png38.96KB10.83KB▼ 72.21%