84% gamipress-notifications-by-type

Code Review | GamiPress - Notifications By Type

WordPress plugin GamiPress - Notifications By Type scored84%from 54 tests.

About plugin

  • Plugin page: gamipress-notific...
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Dec 29, 2017
  • Latest release: Sep 4, 2023
  • Number of updates: 27
  • Update frequency: every 76.9 days
  • Top authors: rubengc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /10,127 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.87ms] Passed 4 tests

This is a short check of server-side resources used by GamiPress - Notifications By Type
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.04 ▼3.94
Dashboard /wp-admin3.33 ▲0.0250.33 ▼0.77
Posts /wp-admin/edit.php3.38 ▲0.0251.98 ▲0.61
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.58 ▼15.39
Media Library /wp-admin/upload.php3.25 ▲0.0238.96 ▲1.17

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for GamiPress - Notifications By Type
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲7314.35 ▼0.062.01 ▼0.0242.82 ▼2.00
Dashboard /wp-admin2,212 ▲355.53 ▼0.1286.12 ▼3.0240.03 ▼1.16
Posts /wp-admin/edit.php2,121 ▲212.00 ▲0.0535.08 ▼2.6537.06 ▼0.08
Add New Post /wp-admin/post-new.php1,541 ▲1523.31 ▲0.43680.02 ▲41.6058.17 ▲3.38
Media Library /wp-admin/upload.php1,420 ▲204.19 ▼0.0198.63 ▲2.1843.86 ▼0.18

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

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)
Even though no errors were found, 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
Please fix the following
  • 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-notifications-by-type/gamipress-notifications-by-type.php:212

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

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
Please fix the following attributes:
  • Tags: There are too many tags (14 tag instead of maximum 10)
The official readme.txt is a good inspiration

gamipress-notifications-by-type/gamipress-notifications-by-type.php 92% from 13 tests

Analyzing the main PHP file in "GamiPress - Notifications By Type" version 1.0.8
It is important to fix the following:
  • Domain Path: The domain path folder was not found ("/languages/")

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
No dangerous file extensions were detected1,279 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP43985741,170
JavaScript23412109

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.00
▷ 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%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin