90% gp-automatic-variants

Code Review | Automatic Variants for GlotPress

WordPress plugin Automatic Variants for GlotPress scored90%from 54 tests.

About plugin

  • Plugin page: gp-automatic-vari...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.8
  • WordPress version: 6.3.1
  • First release: Dec 15, 2021
  • Latest release: Aug 10, 2022
  • Number of updates: 10
  • Update frequency: every 34.2 days
  • Top authors: pedromendonca (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /531 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
Install script ran successfully

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

Analyzing server-side resources used by Automatic Variants for GlotPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0642.66 ▲0.02
Dashboard /wp-admin3.37 ▲0.0249.40 ▼14.28
Posts /wp-admin/edit.php3.48 ▲0.1250.81 ▼1.32
Add New Post /wp-admin/post-new.php5.95 ▲0.0685.15 ▼24.48
Media Library /wp-admin/upload.php3.29 ▲0.0638.07 ▲0.72

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Automatic Variants for GlotPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4514.28 ▼0.071.73 ▲0.0745.89 ▲4.53
Dashboard /wp-admin2,212 ▲325.64 ▼0.0484.24 ▼7.0139.88 ▼3.86
Posts /wp-admin/edit.php2,118 ▲152.02 ▲0.0337.29 ▲0.8038.25 ▲1.52
Add New Post /wp-admin/post-new.php1,538 ▲1023.09 ▲0.26676.96 ▲1.4855.93 ▼1.42
Media Library /wp-admin/upload.php1,414 ▲144.29 ▲0.1496.29 ▼15.9343.15 ▼4.31

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 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 Passed 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
The SRP test was a success

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, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: variants, glotpress, localization, translation

gp-automatic-variants/gp-automatic-variants.php Passed 13 tests

The main file in "Automatic Variants for GlotPress" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
64 characters long description:
Plugin for GlotPress to manage automatically converted variants.

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
Success! There were no dangerous files found in this plugin369 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3136243290
PO File1182579

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods9100.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions114.29%
▷ Anonymous functions685.71%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin