83% activation-add-on-for-gamipress

Code Review | Activation Add-on for GamiPress

WordPress plugin Activation Add-on for GamiPress scored83%from 54 tests.

About plugin

  • Plugin page: activation-add-on...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.5.9+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.5.2
  • WordPress version: 6.3.1
  • First release: Nov 2, 2020
  • Latest release: Nov 3, 2020
  • Number of updates: 4
  • Update frequency: every 1.0 days
  • Top authors: konnektiv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /473 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

Analyzing server-side resources used by Activation Add-on for GamiPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.02 ▲2.09
Dashboard /wp-admin3.31 ▼0.0448.66 ▼19.27
Posts /wp-admin/edit.php3.36 ▲0.0047.45 ▼2.12
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.80 ▼13.08
Media Library /wp-admin/upload.php3.23 ▲0.0038.31 ▼0.53

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Activation Add-on for GamiPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲4914.04 ▼0.231.98 ▲0.3144.44 ▲3.94
Dashboard /wp-admin2,198 ▲215.61 ▲0.0396.09 ▲1.0243.39 ▲3.27
Posts /wp-admin/edit.php2,100 ▼32.03 ▼0.0136.45 ▼4.7731.45 ▼6.42
Add New Post /wp-admin/post-new.php1,526 ▼023.13 ▼0.00677.02 ▼27.7449.45 ▼8.87
Media Library /wp-admin/upload.php1,403 ▲34.12 ▼0.14112.29 ▲10.7246.74 ▲1.25

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/activation-add-on-for-gamipress/gamipress-activation-addon.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: There are too many tags (18 tag instead of maximum 10)
The official readme.txt is a good inspiration

activation-add-on-for-gamipress/gamipress-activation-addon.php 85% from 13 tests

This is the main PHP file of "Activation Add-on for GamiPress" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("activation-add-on-for-gamipress.php" instead of "gamipress-activation-addon.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected188 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP266114178
JSON10010

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.40
Average class complexity15.00
▷ Minimum class complexity5.00
▷ Maximum class complexity25.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods211.76%
▷ Public methods1270.59%
▷ Protected methods00.00%
▷ Private methods529.41%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
There are no PNG files in this plugin