10% superfero-online-courses

Code Review | Superfero Online Courses

WordPress plugin Superfero Online Courses scored 10% from 54 tests.

About plugin

  • Plugin page: superfero-online-...
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.8.1
  • WordPress version: 6.3.1
  • First release: Jul 29, 2014
  • Latest release: Mar 6, 2015
  • Number of updates: 11
  • Update frequency: every 20.0 days
  • Top authors: nhlan82 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 745 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▼1.80MB] [CPU: ▼53.05ms] Passed 4 tests

Analyzing server-side resources used by Superfero Online Courses
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.18 ▼1.285.00 ▼37.19
Dashboard /wp-admin2.20 ▼1.107.01 ▼39.92
Posts /wp-admin/edit.php2.20 ▼1.156.71 ▼41.26
Add New Post /wp-admin/post-new.php2.20 ▼3.687.22 ▼93.81
Media Library /wp-admin/upload.php2.20 ▼1.037.16 ▼26.92
Superfero Settings /wp-admin/options-general.php?page=superfero_settings2.207.15

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 10 new options
New WordPress options
sf_page_name
widget_recent-comments
sf_version
db_upgraded
sf_page_id
sf_page_title
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Superfero Online 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,804 ▲4713.65 ▼0.781.75 ▼0.5143.79 ▼1.15
Dashboard /wp-admin2,210 ▲225.88 ▼0.02104.78 ▼2.4241.14 ▼6.40
Posts /wp-admin/edit.php2,090 ▲12.03 ▼0.0340.37 ▼1.3233.28 ▼2.96
Add New Post /wp-admin/post-new.php1,526 ▼723.45 ▲0.19624.84 ▼57.9853.07 ▼1.92
Media Library /wp-admin/upload.php1,395 ▲104.16 ▼0.0998.20 ▼9.2444.51 ▼2.71
Superfero Settings /wp-admin/options-general.php?page=superfero_settings7962.0624.1026.98

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • sf_version

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=superfero_settings
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
    • > GET request to /wp-admin/options-general.php?page=superfero_settings
    • > Notice in wp-content/plugins/superfero-online-courses/includes/class-superfero-settings.php+131
    Undefined index: title
    • > GET request to /wp-admin/options-general.php?page=superfero_settings
    • > Notice in wp-content/plugins/superfero-online-courses/includes/class-superfero-settings.php+146
    Undefined index: label
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=superfero_settings
    • > Notice in wp-content/plugins/superfero-online-courses/includes/class-superfero-settings.php+241
    Undefined index: description

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The 1st screenshot: Settings on the sidebar), #2 (The 2nd screenshot: Settings -> Superfero Settings), #3 (The 3rh screenshot: 'Superfero Courses' in All Page listing), #4 (The 4th screenshot: Edit the page title, the default page name is Superfero Courses)
  • Donate link: Please fix this invalid URI: ""
The official readme.txt might help

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

The entry point to "Superfero Online Courses" version 2.2 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("superfero-online-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
Everything looks great! No dangerous files found in this plugin593 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4115258382
JavaScript1182121
CSS112090

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity23.50
▷ Minimum class complexity19.00
▷ Maximum class complexity28.00
Average method complexity2.41
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods32
▷ Static methods26.25%
▷ Public methods2887.50%
▷ Protected methods00.00%
▷ Private methods412.50%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png19.46KB5.04KB▼ 74.09%
screenshot-3.png38.28KB11.58KB▼ 69.75%
screenshot-1.png15.29KB3.86KB▼ 74.78%
screenshot-4.png14.03KB3.45KB▼ 75.38%