83% anrghg

Code Review | A.N.R.GHG Publishing Toolkit

WordPress plugin A.N.R.GHG Publishing Toolkit scored83%from 54 tests.

About plugin

  • Plugin page: anrghg
  • Plugin version: 1.16.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.3
  • WordPress version: 6.3.1
  • First release: Jun 3, 2021
  • Latest release: Nov 6, 2023
  • Number of updates: 426
  • Update frequency: every 2.1 days
  • Top authors: anrghg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /6,153 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲14.58MB] [CPU: ▲5.79ms] 75% from 4 tests

A check of server-side resources used by A.N.R.GHG Publishing Toolkit
Please fix the following
  • Extra RAM: The extra memory usage must be under 5MB (currently 14.58MB on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /4.21 ▲0.7537.80 ▼1.77
Dashboard /wp-admin22.50 ▲19.1558.62 ▼2.35
Posts /wp-admin/edit.php22.61 ▲19.2665.09 ▲19.94
Add New Post /wp-admin/post-new.php25.13 ▲19.24104.30 ▲7.33
Media Library /wp-admin/upload.php22.42 ▲19.1954.43 ▲21.73

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 85 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by A.N.R.GHG Publishing Toolkit
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲4514.52 ▲0.121.72 ▲0.0937.79 ▼2.22
Dashboard /wp-admin2,195 ▲205.64 ▼0.2289.52 ▼13.6738.65 ▼2.07
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0740.08 ▲2.0935.43 ▲1.22
Add New Post /wp-admin/post-new.php6,380 ▲4,85427.78 ▲5.02884.89 ▲278.6637.64 ▼17.00
Media Library /wp-admin/upload.php1,391 ▼94.27 ▲0.1099.88 ▲2.3740.84 ▼0.03

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 34× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/anrghg/includes/interoperability.php
    • > /wp-content/plugins/anrghg/admin/options/templates.php
    • > /wp-content/plugins/anrghg/admin/options/settings-cb-interoperability.php
    • > /wp-content/plugins/anrghg/admin/options/settings-ui.php
    • > /wp-content/plugins/anrghg/includes/filtered.php
    • > /wp-content/plugins/anrghg/admin/options/settings-text.php
    • > /wp-content/plugins/anrghg/template-mini-plugin.php
    • > /wp-content/plugins/anrghg/anrghg.php
    • > /wp-content/plugins/anrghg/includes/security.php
    • > /wp-content/plugins/anrghg/includes/helpers.php

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

anrghg/anrghg.php 92% from 13 tests

The main PHP file in "A.N.R.GHG Publishing Toolkit" ver. 1.16.5 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 253 characters long)

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 detected63,891 lines of code in 58 files:
LanguageFilesBlank linesComment linesLines of code
JSON43035,482
PHP341,97110,01718,174
PO File43,3286,1408,675
JavaScript122111631,377
Bourne Shell1084119
XML121163
HTML1041
CSS1080

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions713
▷ Named functions33847.41%
▷ Anonymous functions37552.59%
Constants13
▷ Global constants13100.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
No PNG images were found in this plugin