79% gp-convert-pt-ao90

Code Review | Convert PT AO90 for GlotPress

WordPress plugin Convert PT AO90 for GlotPress scored79%from 54 tests.

About plugin

  • Plugin page: gp-convert-pt-ao90
  • Plugin version: 1.3.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.4
  • WordPress version: 6.3.1
  • First release: Dec 3, 2021
  • Latest release: Nov 30, 2023
  • Number of updates: 50
  • Update frequency: every 14.5 days
  • Top authors: pedromendonca (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,752 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▼9.77ms] Passed 4 tests

An overview of server-side resources used by Convert PT AO90 for GlotPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1335.29 ▼6.14
Dashboard /wp-admin3.44 ▲0.0947.21 ▼17.08
Posts /wp-admin/edit.php3.55 ▲0.2049.09 ▲2.52
Add New Post /wp-admin/post-new.php6.02 ▲0.1386.12 ▼17.44
Media Library /wp-admin/upload.php3.36 ▲0.1334.87 ▲1.57

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 42 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Convert PT AO90 for GlotPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲8514.25 ▼0.151.84 ▲0.1136.58 ▼7.81
Dashboard /wp-admin2,212 ▲345.62 ▼0.03102.27 ▼0.1145.56 ▲2.70
Posts /wp-admin/edit.php2,118 ▲181.98 ▼0.0440.72 ▲1.9937.58 ▲4.86
Add New Post /wp-admin/post-new.php1,540 ▲1423.56 ▲0.45665.59 ▲57.1456.26 ▲8.05
Media Library /wp-admin/upload.php1,414 ▲114.18 ▲0.0198.82 ▲2.7242.89 ▼2.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 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 following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/gp-convert-pt-ao90/vendor/pedro-mendonca/convert-pt-ao90/inc/build-replace-pairs.php
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      require_once(wp-content/plugins/gp-convert-pt-ao90/vendor/pedro-mendonca/convert-pt-ao90/tests/test-cases.php): failed to open stream: No such file or directory in wp-content/plugins/gp-convert-pt-ao90/vendor/pedro-mendonca/convert-pt-ao90/example.php on line 35
    • > PHP Warning
      file_put_contents(inc/replace_pairs.json): failed to open stream: No such file or directory in wp-content/plugins/gp-convert-pt-ao90/vendor/pedro-mendonca/convert-pt-ao90/inc/build-replace-pairs.php on line 50
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/gp-convert-pt-ao90/vendor/pedro-mendonca/convert-pt-ao90/tests/test-cases.php' (include_path='.:/usr/share/php') in wp-content/plugins/gp-convert-pt-ao90/vendor/pedro-mendonca/convert-pt-ao90/example.php on line 35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function gp_translation_row_classes() in wp-content/plugins/gp-convert-pt-ao90/gp-templates/translation-row-preview.php:18

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 Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: translation, portuguese, localization, glotpress, ao90

gp-convert-pt-ao90/gp-convert-pt-ao90.php Passed 13 tests

The principal PHP file in "Convert PT AO90 for GlotPress" v. 1.3.3 is loaded by WordPress automatically on each request
122 characters long description:
Language tool for GlotPress to convert text according to the Portuguese Language Orthographic Agreement of 1990 (PT AO90).

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin9,187 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
JSON3007,645
PHP194249751,412
CSS29750
PO File1101243
Sass111237

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity26.80
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods56
▷ Static methods3460.71%
▷ Public methods5394.64%
▷ Protected methods00.00%
▷ Private methods35.36%
Functions14
▷ Named functions1071.43%
▷ Anonymous functions428.57%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin