84% trados

Code Review | Trados

WordPress plugin Trados scored84%from 54 tests.

About plugin

  • Plugin page: trados
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.0-5.2.4
  • WordPress version: 6.3.1
  • First release: Nov 13, 2019
  • Latest release: Nov 13, 2019
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: djerba (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /437 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 successfully, without throwing any errors or notices

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

Server-side resources used by Trados
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0145.91 ▲2.26
Dashboard /wp-admin3.31 ▲0.0145.86 ▼5.72
Posts /wp-admin/edit.php3.36 ▲0.0149.57 ▲3.76
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.69 ▲1.51
Media Library /wp-admin/upload.php3.24 ▲0.0134.51 ▲2.34

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Trados
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲7913.24 ▼1.022.01 ▼0.2854.41 ▲5.83
Dashboard /wp-admin2,220 ▲294.85 ▼1.05109.46 ▼1.1141.66 ▼6.98
Posts /wp-admin/edit.php2,103 ▲112.00 ▲0.0140.59 ▲1.4635.85 ▲1.43
Add New Post /wp-admin/post-new.php1,541 ▲1323.09 ▲4.94659.55 ▲38.0455.99 ▲5.22
Media Library /wp-admin/upload.php1,399 ▲114.20 ▼0.02107.46 ▲9.5546.75 ▲4.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 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)
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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/trados/index.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Trados frontend), #2 (Trados dashboard), #3 (Trados translation panel)
You can take inspiration from this readme.txt

trados/index.php 92% from 13 tests

The principal PHP file in "Trados" v. 1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("trados.php" instead of "index.php")

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
Everything looks great! No dangerous files found in this plugin444 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1152159
CSS2190144
PHP11516141

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.30MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/16.png1.47KB0.68KB▼ 53.88%
screenshot-3.png136.83KB52.75KB▼ 61.45%
images/32.png2.29KB1.31KB▼ 42.82%
screenshot-2.png10.57KB5.76KB▼ 45.55%
screenshot-1.png159.14KB57.14KB▼ 64.09%