79% courseticket

Code Review | Courseticket

WordPress plugin Courseticket scored79%from 54 tests.

About plugin

  • Plugin page: courseticket
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Feb 18, 2016
  • Latest release: Feb 17, 2016
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: courseticket (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /556 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼9.56ms] Passed 4 tests

Server-side resources used by Courseticket
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0241.03 ▼2.11
Dashboard /wp-admin3.32 ▼0.0250.94 ▼10.77
Posts /wp-admin/edit.php3.38 ▲0.0247.77 ▼7.91
Add New Post /wp-admin/post-new.php5.91 ▲0.0293.66 ▼15.63
Media Library /wp-admin/upload.php3.25 ▲0.0233.27 ▼3.93

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Courseticket
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,937 ▲17613.43 ▼0.728.53 ▲6.9442.76 ▼0.78
Dashboard /wp-admin2,201 ▲245.55 ▼0.0489.46 ▲3.6375.40 ▲36.88
Posts /wp-admin/edit.php2,115 ▲121.98 ▲0.0333.78 ▼12.3633.40 ▼7.01
Add New Post /wp-admin/post-new.php1,553 ▲2723.08 ▼0.13731.41 ▲67.5154.39 ▼2.95
Media Library /wp-admin/upload.php1,406 ▲94.22 ▲0.01102.34 ▼23.0469.59 ▲15.25

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/courseticket/courseticket.php
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/courseticket/templates/ct-overview.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/courseticket/tests/WP_UnitTestCase.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/courseticket/tests/WP_UnitTestCase.php:27
    • > PHP Warning
      require_once(CT__PLUGIN_DIRincludes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/courseticket/includes/bootstrap.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/courseticket/tests/includes/ButtonReplacerTest.php:3
    • > PHP Warning
      Use of undefined constant CT__PLUGIN_DIR - assumed 'CT__PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/courseticket/includes/bootstrap.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'CT__PLUGIN_DIRincludes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/courseticket/includes/bootstrap.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: courseticket, events

courseticket/courseticket.php Passed 13 tests

The principal PHP file in "Courseticket" v. 0.2 is loaded by WordPress automatically on each request
59 characters long description:
Display and manage courseticket events easily in wordpress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin352 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP1478128328
XML10014
CSS10010

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity3.14
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.58
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes00.00%
Methods27
▷ Static methods1348.15%
▷ Public methods2177.78%
▷ Protected methods00.00%
▷ Private methods622.22%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/menu-icon.png0.40KB0.29KB▼ 28.88%
img/button-example.png13.03KB5.23KB▼ 59.82%