83% gamipress-wpachievements-importer

Code Review | GamiPress - WPAchievements Importer

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

About plugin

  • Plugin page: gamipress-wpachie...
  • Plugin version: 1.0.4
  • 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: 23
  • Update frequency: every 93.0 days
  • Top authors: rubengc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,998 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.15MB] [CPU: ▼12.33ms] Passed 4 tests

This is a short check of server-side resources used by GamiPress - WPAchievements Importer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0236.86 ▼0.36
Dashboard /wp-admin3.22 ▼0.0930.62 ▼16.23
Posts /wp-admin/edit.php3.29 ▼0.0732.32 ▼12.19
Add New Post /wp-admin/post-new.php5.46 ▼0.4367.58 ▼18.74
Media Library /wp-admin/upload.php3.23 ▼0.0133.95 ▼2.15

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for GamiPress - WPAchievements Importer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲5714.36 ▲0.081.71 ▲0.0542.26 ▲0.89
Dashboard /wp-admin2,203 ▲295.53 ▼0.1385.81 ▼7.9337.77 ▼5.27
Posts /wp-admin/edit.php2,115 ▲152.00 ▲0.0536.60 ▲1.7234.12 ▼1.08
Add New Post /wp-admin/post-new.php1,534 ▲823.74 ▲2.63670.49 ▼7.3656.91 ▲4.65
Media Library /wp-admin/upload.php1,414 ▲204.24 ▲0.07113.20 ▲18.0349.31 ▲3.83

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, 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
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gamipress-wpachievements-importer/gamipress-wpachievements-importer.php:203

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: Too many tags (18 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

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

The entry point to "GamiPress - WPAchievements Importer" version 1.0.4 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • 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 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected702 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3265269652
JavaScript216750

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity3.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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
PNG images were not found in this plugin