84% page-translator

Code Review | Page Translator

WordPress plugin Page Translator scored84%from 54 tests.

About plugin

  • Plugin page: page-translator
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-3.7.1
  • WordPress version: 6.3.1
  • First release: Dec 7, 2013
  • Latest release: Dec 7, 2013
  • Number of updates: 11
  • Update frequency: every 0.6 days
  • Top authors: jiripolacek (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,052 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.82ms] Passed 4 tests

Analyzing server-side resources used by Page Translator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0046.95 ▲3.75
Dashboard /wp-admin3.35 ▲0.0150.84 ▼2.45
Posts /wp-admin/edit.php3.40 ▲0.0050.71 ▼4.19
Add New Post /wp-admin/post-new.php5.93 ▲0.0086.65 ▼10.83
Media Library /wp-admin/upload.php3.27 ▲0.0036.20 ▲2.20

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Page Translator: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲3914.06 ▼0.291.76 ▲0.0744.05 ▼0.71
Dashboard /wp-admin2,192 ▲155.58 ▼0.0891.75 ▲0.5337.89 ▼12.19
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0934.55 ▼1.6333.77 ▲0.12
Add New Post /wp-admin/post-new.php1,525 ▼123.18 ▲0.14612.03 ▼99.9154.52 ▼3.80
Media Library /wp-admin/upload.php1,400 ▼04.23 ▲0.0997.72 ▼7.1642.87 ▼3.79

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/page-translator/page-translator.php:15

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 issues were 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:
  • Plugin Name: You should set the name of your plugin on the first line ( === page-translator === )
You can take inspiration from this readme.txt

page-translator/page-translator.php 92% from 13 tests

The primary PHP file in "Page Translator" version 1.1.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 508 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
Everything looks great! No dangerous files found in this plugin14 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP29814

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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