94% gamipress-wp-postratings-integration

Code Review | GamiPress - WP PostRatings integration

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

About plugin

  • Plugin page: gamipress-wp-post...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.9
  • WordPress version: 5.9.2
  • First release: Feb 12, 2018
  • Latest release: Jan 24, 2022
  • Number of updates: 19
  • Update frequency: every 76.0 days
  • Top authors: rubengc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 2,262 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

Analyzing server-side resources used by GamiPress - WP PostRatings integration
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0153.69 ▲5.84
Dashboard /wp-admin3.42 ▲0.0132.81 ▼0.38
Posts /wp-admin/edit.php3.65 ▲0.0137.83 ▲1.55
Add New Post /wp-admin/post-new.php6.89 ▼0.0892.18 ▼1,186.06
Media Library /wp-admin/upload.php3.30 ▲0.0124.93 ▼1.58

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

Analyzing filesystem and database footprints of this plugin
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 - WP PostRatings integration
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,815 ▲9315.88 ▲0.255.75 ▼0.082.13 ▼0.17
Dashboard /wp-admin2,923 ▲626.13 ▲0.01119.52 ▼12.14159.30 ▼3.34
Posts /wp-admin/edit.php2,719 ▲313.25 ▲0.0265.69 ▲2.11141.88 ▲3.67
Add New Post /wp-admin/post-new.php1,705 ▼4720.58 ▼0.96453.64 ▼4.27156.50 ▲3.01
Media Library /wp-admin/upload.php1,726 ▲315.51 ▼0.05140.31 ▲5.37185.81 ▲4.01

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
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 add_action() in wp-content/plugins/gamipress-wp-postratings-integration/gamipress-wp-postratings-integration.php:229

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (14 tag instead of maximum 10)
The official readme.txt might help

gamipress-wp-postratings-integration/gamipress-wp-postratings-integration.php Passed 13 tests

The main PHP script in "GamiPress - WP PostRatings integration" version 1.0.5 is automatically included on every request by WordPress
38 characters long description:
Connect GamiPress with WP PostRatings.

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
Good job! No executable or dangerous file extensions detected388 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP7129331337
JavaScript213751

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.68
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity7.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%
Functions16
▷ Named functions16100.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
There were not PNG files found in your plugin