84% secure-gettext

Code Review | Secure Gettext

WordPress plugin Secure Gettext scored84%from 54 tests.

About plugin

  • Plugin page: secure-gettext
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.11-4.4
  • WordPress version: 6.3.1
  • First release: Jan 6, 2016
  • Latest release: Jan 5, 2016
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: akirk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /690 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

Server-side resources used by Secure Gettext
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0144.42 ▲1.48
Dashboard /wp-admin3.32 ▲0.0251.62 ▼1.26
Posts /wp-admin/edit.php3.37 ▲0.0151.06 ▲3.98
Add New Post /wp-admin/post-new.php5.91 ▲0.02102.30 ▲0.27
Media Library /wp-admin/upload.php3.24 ▲0.0141.80 ▲3.94

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Secure Gettext
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.26 ▼0.141.85 ▲0.0846.07 ▲3.89
Dashboard /wp-admin2,192 ▲155.60 ▲0.0195.86 ▲2.2442.86 ▼2.77
Posts /wp-admin/edit.php2,100 ▼32.03 ▼0.0340.93 ▲3.4338.45 ▼1.02
Add New Post /wp-admin/post-new.php1,544 ▼123.40 ▲0.27596.27 ▼54.3254.07 ▼1.93
Media Library /wp-admin/upload.php1,400 ▼04.23 ▼0.0295.08 ▼9.1440.77 ▼5.39

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/secure-gettext/secure-gettext.php:90

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === secure-gettext === )
You can look at the official readme.txt

secure-gettext/secure-gettext.php Passed 13 tests

The main PHP file in "Secure Gettext" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
46 characters long description:
Escapes translated text before it gets output.

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 detected38 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1173838

PHP code Passed 2 tests

A short review 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.56
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods3100.00%
▷ Public methods266.67%
▷ Protected methods00.00%
▷ Private methods133.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin