94% gamipress-sensei-integration

Code Review | GamiPress - Sensei integration

WordPress plugin GamiPress - Sensei integration scored 94% from 54 tests.

About plugin

  • Plugin page: gamipress-sensei-...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.9
  • WordPress version: 5.9.2
  • First release: Feb 21, 2018
  • Latest release: Jan 24, 2022
  • Number of updates: 15
  • Update frequency: every 95.5 days
  • Top authors: rubengc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 1,973 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼302.22ms] Passed 4 tests

An overview of server-side resources used by GamiPress - Sensei integration
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0156.99 ▲9.16
Dashboard /wp-admin3.41 ▲0.0131.64 ▼0.28
Posts /wp-admin/edit.php3.65 ▲0.0135.79 ▼5.10
Add New Post /wp-admin/post-new.php6.89 ▼0.0892.15 ▼1,204.95
Media Library /wp-admin/upload.php3.30 ▲0.0124.05 ▲1.44

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by GamiPress - Sensei integration
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,823 ▲6915.89 ▲0.315.81 ▼0.362.57 ▲0.10
Dashboard /wp-admin2,923 ▲626.07 ▼0.05115.51 ▼19.92157.46 ▼4.16
Posts /wp-admin/edit.php2,685 ▼93.25 ▲0.0164.70 ▲2.38142.53 ▲1.90
Add New Post /wp-admin/post-new.php1,704 ▲4318.30 ▲2.05405.04 ▼1.90156.23 ▲0.05
Media Library /wp-admin/upload.php1,726 ▲285.54 ▲0.00145.50 ▲7.71189.15 ▲9.65

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gamipress-sensei-integration/gamipress-sensei.php:238

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 24 tag instead of maximum 10
You can look at the official readme.txt

gamipress-sensei-integration/gamipress-sensei.php 92% from 13 tests

The entry point to "GamiPress - Sensei integration" version 1.0.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("gamipress-sensei-integration.php" instead of "gamipress-sensei.php")

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
Success! There were no dangerous files found in this plugin384 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP7139337343
JavaScript212441

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods9
▷ Static methods111.11%
▷ Public methods555.56%
▷ Protected methods00.00%
▷ Private methods444.44%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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