83% op-addon-for-wp-courseware

Code Review | WP Courseware for OptimizePress

WordPress plugin WP Courseware for OptimizePress scored83%from 54 tests.

About plugin

  • Plugin page: op-addon-for-wp-c...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.4
  • WordPress version: 6.3.1
  • First release: Nov 17, 2015
  • Latest release: Apr 17, 2020
  • Number of updates: 12
  • Update frequency: every 134.4 days
  • Top authors: flyplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,254 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 gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼11.75ms] Passed 4 tests

Analyzing server-side resources used by WP Courseware for OptimizePress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.10 ▲0.18
Dashboard /wp-admin3.31 ▼0.0352.86 ▼18.20
Posts /wp-admin/edit.php3.36 ▲0.0143.52 ▼6.34
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.68 ▼19.20
Media Library /wp-admin/upload.php3.23 ▲0.0134.33 ▼3.26

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WP Courseware for OptimizePress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▲0.072.00 ▲0.1243.50 ▼0.68
Dashboard /wp-admin2,192 ▲155.51 ▼0.1083.72 ▼8.7841.16 ▲0.18
Posts /wp-admin/edit.php2,100 ▼01.98 ▲0.0333.44 ▼7.6235.83 ▲1.18
Add New Post /wp-admin/post-new.php1,526 ▼023.16 ▲0.26626.73 ▲29.9262.30 ▲16.18
Media Library /wp-admin/upload.php1,400 ▼04.23 ▲0.0597.31 ▼8.6243.85 ▼5.25

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • 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 no errors were found, 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 fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/op-addon-for-wp-courseware/op-wpcourseware.php:23

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

op-addon-for-wp-courseware/op-wpcourseware.php 85% from 13 tests

The primary PHP file in "WP Courseware for OptimizePress" version 1.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 149 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("op-addon-for-wp-courseware.php" instead of "op-wpcourseware.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected109 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12960109

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods337.50%
▷ Public methods787.50%
▷ Protected methods112.50%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected