84% gamipress-points-csv-tool

Code Review | GamiPress - Points CSV Tool

WordPress plugin GamiPress - Points CSV Tool scored84%from 54 tests.

About plugin

  • Plugin page: gamipress-points-...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Jun 28, 2018
  • Latest release: Sep 4, 2023
  • Number of updates: 17
  • Update frequency: every 111.4 days
  • Top authors: rubengc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,359 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by GamiPress - Points CSV Tool
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.74 ▼0.26
Dashboard /wp-admin3.33 ▼0.0250.27 ▼20.16
Posts /wp-admin/edit.php3.38 ▲0.0249.59 ▼6.39
Add New Post /wp-admin/post-new.php5.91 ▲0.0293.73 ▼10.41
Media Library /wp-admin/upload.php3.25 ▲0.0236.20 ▲0.81

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for GamiPress - Points CSV Tool
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲9613.31 ▼1.071.83 ▲0.0244.55 ▼2.07
Dashboard /wp-admin2,226 ▲354.86 ▼1.18102.42 ▼2.7641.81 ▲0.28
Posts /wp-admin/edit.php2,109 ▲232.06 ▲0.0540.84 ▲4.0235.98 ▲0.31
Add New Post /wp-admin/post-new.php1,526 ▼1617.39 ▼1.01616.29 ▼24.8049.63 ▼5.95
Media Library /wp-admin/upload.php1,405 ▲174.30 ▲0.07102.87 ▲2.5944.12 ▼1.76

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gamipress-points-csv-tool/gamipress-points-csv-tool.php:220

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)
There were no browser issues found

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Tags: There are too many tags (17 tag instead of maximum 10)
You can take inspiration from this readme.txt

gamipress-points-csv-tool/gamipress-points-csv-tool.php 92% from 13 tests

The principal PHP file in "GamiPress - Points CSV Tool" v. 1.0.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "4.4")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin459 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3118172293
JavaScript27635166

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity5.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%
Functions6
▷ Named functions6100.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
There are no PNG files in this plugin