84% gamipress-activity-by-category

Code Review | GamiPress - Activity by Category

WordPress plugin GamiPress - Activity by Category scored84%from 54 tests.

About plugin

  • Plugin page: gamipress-activit...
  • Plugin version: 1.0.9
  • 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: 33
  • Update frequency: every 64.8 days
  • Top authors: rubengc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /9,266 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼8.77ms] Passed 4 tests

This is a short check of server-side resources used by GamiPress - Activity by Category
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.55 ▼1.33
Dashboard /wp-admin3.31 ▼0.0340.87 ▼18.69
Posts /wp-admin/edit.php3.36 ▲0.0148.84 ▲1.91
Add New Post /wp-admin/post-new.php5.89 ▲0.0176.34 ▼9.83
Media Library /wp-admin/upload.php3.23 ▲0.0129.99 ▼5.24

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for GamiPress - Activity by Category
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4514.38 ▲0.031.68 ▲0.0437.72 ▼3.97
Dashboard /wp-admin2,212 ▲375.64 ▼0.0296.19 ▼16.0243.91 ▲0.28
Posts /wp-admin/edit.php2,118 ▲182.00 ▲0.0240.11 ▼0.4436.41 ▼4.57
Add New Post /wp-admin/post-new.php1,538 ▲1223.91 ▲0.76661.62 ▼32.1747.59 ▼5.73
Media Library /wp-admin/upload.php1,414 ▲174.21 ▲0.0193.22 ▼4.4141.34 ▼2.26

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

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)
Good news, no errors were detected

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 fix the following items
  • 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-activity-by-category/gamipress-activity-by-category.php:207

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
You can take inspiration from this readme.txt

gamipress-activity-by-category/gamipress-activity-by-category.php 92% from 13 tests

The primary PHP file in "GamiPress - Activity by Category" version 1.0.9 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Requires at least: Required version does not 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 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin412 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP7154359371
JavaScript212441

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.67
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin