83% gamipress-badgeos-importer

Code Review | GamiPress - BadgeOS Importer

WordPress plugin GamiPress - BadgeOS Importer scored83%from 54 tests.

About plugin

  • Plugin page: gamipress-badgeos...
  • Plugin version: 1.1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Oct 27, 2017
  • Latest release: Sep 4, 2023
  • Number of updates: 36
  • Update frequency: every 59.4 days
  • Top authors: rubengc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /3,719 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by GamiPress - BadgeOS Importer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.48 ▼6.27
Dashboard /wp-admin3.32 ▼0.0248.08 ▼16.62
Posts /wp-admin/edit.php3.38 ▲0.0247.76 ▼2.12
Add New Post /wp-admin/post-new.php5.91 ▲0.0295.36 ▼11.74
Media Library /wp-admin/upload.php3.25 ▲0.0239.63 ▲3.17

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

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

Browser metrics Passed 4 tests

A check of browser resources used by GamiPress - BadgeOS Importer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲4514.39 ▼0.221.96 ▼0.3640.95 ▼9.18
Dashboard /wp-admin2,215 ▲385.64 ▲0.0687.00 ▼7.6947.33 ▲4.02
Posts /wp-admin/edit.php2,118 ▲182.04 ▲0.0437.88 ▲2.7737.72 ▲2.85
Add New Post /wp-admin/post-new.php1,538 ▲1223.25 ▲0.45664.02 ▼11.9356.03 ▲5.28
Media Library /wp-admin/upload.php1,417 ▲174.21 ▼0.0796.52 ▼6.5443.86 ▲0.86

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gamipress-badgeos-importer/gamipress-badgeos-importer.php:198

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 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: There are too many tags (13 tag instead of maximum 10)
You can take inspiration from this readme.txt

gamipress-badgeos-importer/gamipress-badgeos-importer.php 85% from 13 tests

Analyzing the main PHP file in "GamiPress - BadgeOS Importer" version 1.1.8
The following require your attention:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0" instead of "4.4")
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin1,644 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP55104581,514
JavaScript24328130

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods7
▷ Static methods114.29%
▷ Public methods342.86%
▷ Protected methods00.00%
▷ Private methods457.14%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
No PNG images were found in this plugin