10% superfero-courses

Code Review | Superfero Courses

WordPress plugin Superfero Courses scored10%from 54 tests.

About plugin

  • Plugin page: superfero-courses
  • Plugin version: 3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.8.1
  • WordPress version: 6.3.1
  • First release: Jul 23, 2014
  • Latest release: Mar 6, 2015
  • Number of updates: 16
  • Update frequency: every 14.2 days
  • Top authors: nhlan82 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /761 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/superfero-courses/superfero.php+33
    Function create_function() is deprecated

Server metrics [RAM: ▼1.97MB] [CPU: ▼57.73ms] Passed 4 tests

Analyzing server-side resources used by Superfero Courses
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.50 ▼38.08
Dashboard /wp-admin2.05 ▼1.305.97 ▼63.87
Posts /wp-admin/edit.php2.05 ▼1.316.64 ▼42.06
Add New Post /wp-admin/post-new.php2.05 ▼3.846.95 ▼86.92
Media Library /wp-admin/upload.php2.05 ▼1.185.12 ▼33.45

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_superfero_campaign_widget
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Superfero Courses: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5614.46 ▼0.102.11 ▲0.2544.80 ▲2.70
Dashboard /wp-admin2,221 ▲155.06 ▼0.81109.91 ▲5.1340.94 ▲1.89
Posts /wp-admin/edit.php2,100 ▼02.04 ▲0.0339.58 ▼1.8135.05 ▼3.43
Add New Post /wp-admin/post-new.php1,539 ▼623.29 ▼0.07601.44 ▼75.0748.90 ▼5.37
Media Library /wp-admin/upload.php1,400 ▲34.24 ▼0.0293.76 ▼19.4446.41 ▼1.03

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/superfero-courses/superfero.php+33
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/superfero-courses/superfero.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/superfero-courses/superfero-campaign-widget.php:5

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 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 (1 - The first screenshot shows the widget in the sidebar with a title, an author email, number of courses to show, select the course's language and show items in thumbview.)
  • Donate link: Please fix this invalid url: ""
Please take inspiration from this readme.txt

superfero-courses/superfero.php 92% from 13 tests

The principal PHP file in "Superfero Courses" v. 3.2 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("superfero-courses.php" instead of "superfero.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 detected154 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP43264154

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity3.86
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png38.77KB10.98KB▼ 71.67%