84% pride-codes

Code Review | Pride Codes

WordPress plugin Pride Codes scored 84% from 54 tests.

About plugin

  • Plugin page: pride-codes
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3
  • WordPress version: 6.3.1
  • First release: Sep 19, 2017
  • Latest release: Aug 10, 2023
  • Number of updates: 23
  • Update frequency: every 93.6 days
  • Top authors: ahortin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 1,659 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.01ms] Passed 4 tests

A check of server-side resources used by Pride Codes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0533.98 ▼6.24
Dashboard /wp-admin3.36 ▲0.0643.92 ▼10.38
Posts /wp-admin/edit.php3.41 ▲0.0547.33 ▼9.74
Add New Post /wp-admin/post-new.php5.94 ▲0.0592.80 ▲2.35
Media Library /wp-admin/upload.php3.28 ▲0.0535.17 ▼1.66
Pride Codes /wp-admin/options-general.php?page=pride-codes3.2531.35

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pride Codes
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.34 ▼1.421.71 ▼0.3040.89 ▼10.11
Dashboard /wp-admin2,210 ▲224.85 ▼1.19108.75 ▼6.5643.66 ▼2.43
Posts /wp-admin/edit.php2,093 ▲72.03 ▲0.0439.97 ▲2.5035.84 ▲1.69
Add New Post /wp-admin/post-new.php1,517 ▼1617.86 ▼5.59589.08 ▼86.3853.75 ▲1.84
Media Library /wp-admin/upload.php1,386 ▼24.18 ▼0.0198.09 ▼10.1142.44 ▼5.00
Pride Codes /wp-admin/options-general.php?page=pride-codes8432.0425.6030.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

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
Even though no errors were found, 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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pride-codes/pride-codes.php:35

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)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: marriage equality, pride, equality, lgbtqi

pride-codes/pride-codes.php Passed 13 tests

Analyzing the main PHP file in "Pride Codes" version 1.1.2
62 characters long description:
Show your support for your fellow LGBTQI+ friends & colleagues

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
Good job! No executable or dangerous file extensions detected246 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24439217
CSS10029

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
7 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/voteyes_corner_right.png9.13KB3.14KB▼ 65.56%
images/voteyes_corner_left.png7.07KB3.12KB▼ 55.81%
images/wear_it_purple.png10.75KB4.93KB▼ 54.13%
images/code_corner.png6.13KB2.14KB▼ 65.02%
images/rainbow_corner.png5.36KB1.59KB▼ 70.39%