78% course

Code Review | Course

WordPress plugin Course scored 78% from 54 tests.

About plugin

  • Plugin page: course
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.1
  • WordPress version: 6.3.1
  • First release: Aug 28, 2014
  • Latest release: Mar 6, 2019
  • Number of updates: 18
  • Update frequency: every 91.8 days
  • Top authors: imran3229 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 3,796 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.54MB] [CPU: ▼30.18ms] Passed 4 tests

This is a short check of server-side resources used by Course
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.80 ▼0.6619.94 ▼23.18
Dashboard /wp-admin3.23 ▼0.0732.96 ▼31.50
Posts /wp-admin/edit.php3.16 ▼0.1925.75 ▼24.81
Add New Post /wp-admin/post-new.php4.63 ▼1.2549.76 ▼41.24
Media Library /wp-admin/upload.php3.26 ▲0.0436.01 ▲2.39
Courses /wp-admin/edit.php?post_type=course3.1626.44
Add New /wp-admin/post-new.php?post_type=course3.4146.87
Course Category /wp-admin/edit-tags.php?taxonomy=course-categories&post_type=course3.2633.85

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Course
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲9913.58 ▼0.651.96 ▲0.1238.37 ▼4.38
Dashboard /wp-admin2,237 ▲525.01 ▼0.80107.96 ▼7.1038.77 ▼11.74
Posts /wp-admin/edit.php2,120 ▲522.05 ▲0.0536.93 ▲0.0334.97 ▲1.14
Add New Post /wp-admin/post-new.php1,559 ▲3923.26 ▲0.18635.71 ▼40.8549.29 ▼11.29
Media Library /wp-admin/upload.php1,422 ▲344.22 ▲0.0194.50 ▼15.7344.59 ▼3.92
Courses /wp-admin/edit.php?post_type=course1,1351.9430.5129.82
Add New /wp-admin/post-new.php?post_type=course2,7067.72189.5974.19
Course Category /wp-admin/edit-tags.php?taxonomy=course-categories&post_type=course1,2932.1425.8226.38

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/edit.php?post_type=course
    • > Notice in wp-content/plugins/course/course.php+190
    Undefined index: course-categories

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 fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/course/course.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/course/single-course.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/course/archive-course.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% 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
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Add New Editor), #2 (Custom Fields Meta Boxes)
The official readme.txt might help

course/course.php Passed 13 tests

"Course" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
99 characters long description:
Declares a plugin that will create a custom post type displaying courses offered by an institution.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin276 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33514276

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.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
screenshot-2.png6.94KB4.05KB▼ 41.63%
screenshot-1.png38.86KB19.73KB▼ 49.23%