84% gamipress-emails-by-type

Code Review | GamiPress - Emails By Type

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

About plugin

  • Plugin page: gamipress-emails-...
  • Plugin version: 1.0.3
  • 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: 19
  • Update frequency: every 109.2 days
  • Top authors: rubengc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /6,119 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

An overview of server-side resources used by GamiPress - Emails By Type
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.50 ▼6.57
Dashboard /wp-admin3.31 ▲0.0143.07 ▼6.62
Posts /wp-admin/edit.php3.36 ▲0.0143.22 ▼1.76
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.64 ▼6.53
Media Library /wp-admin/upload.php3.23 ▲0.0133.53 ▼3.43

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for GamiPress - Emails By Type
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲8513.24 ▼1.374.58 ▲2.3340.42 ▼11.76
Dashboard /wp-admin2,223 ▲385.84 ▼0.0498.93 ▼3.1338.10 ▼3.50
Posts /wp-admin/edit.php2,106 ▲142.02 ▲0.0037.82 ▼1.4936.30 ▲0.85
Add New Post /wp-admin/post-new.php1,531 ▼1123.26 ▲5.03592.48 ▼58.9449.17 ▼5.39
Media Library /wp-admin/upload.php1,399 ▲114.23 ▲0.06100.21 ▼1.4842.89 ▼5.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gamipress-emails-by-type/gamipress-emails-by-type.php:211

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
You can take inspiration from this readme.txt

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

The main PHP script in "GamiPress - Emails By Type" version 1.0.3 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages/")

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
No dangerous file extensions were detected1,191 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP44316621,087
JavaScript2277100
CSS2004

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions35
▷ Named functions35100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
There were not PNG files found in your plugin