83% tt-options

Code Review | TT-Options

WordPress plugin TT-Options scored83%from 54 tests.

About plugin

  • Plugin page: tt-options
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.9.7
  • WordPress version: 6.3.1
  • First release: Nov 4, 2014
  • Latest release: Jul 10, 2018
  • Number of updates: 81
  • Update frequency: every 16.6 days
  • Top authors: thesabeltuto (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,319 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.00MB] [CPU: ▼2.88ms] Passed 4 tests

A check of server-side resources used by TT-Options
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.71 ▲2.12
Dashboard /wp-admin3.31 ▼0.0350.70 ▼10.98
Posts /wp-admin/edit.php3.37 ▲0.0147.67 ▲4.59
Add New Post /wp-admin/post-new.php5.89 ▲0.0179.72 ▼7.25
Media Library /wp-admin/upload.php3.24 ▲0.0138.31 ▲5.20

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for TT-Options
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲16713.46 ▼0.798.31 ▲6.6844.19 ▲4.90
Dashboard /wp-admin2,215 ▲345.53 ▼0.3885.04 ▼13.2039.81 ▼3.94
Posts /wp-admin/edit.php2,117 ▲172.00 ▲0.0537.43 ▲4.4932.77 ▼1.14
Add New Post /wp-admin/post-new.php1,543 ▲1723.32 ▲0.09653.83 ▼2.9262.37 ▲7.40
Media Library /wp-admin/upload.php1,417 ▲204.13 ▼0.07112.25 ▼4.5045.87 ▲1.07

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

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)
Everything seems fine, however this is by no means an exhaustive test

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
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/tt-options/tt-options.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tt-options/includes/admin.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/tt-options/includes/custom-codes.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
  • Screenshots: Screenshot #1 (TT-Options Dashboard) image required
Please take inspiration from this readme.txt

tt-options/tt-options.php 92% from 13 tests

"TT-Options" version 1.0.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 310 characters long)

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
There were no executable files found in this plugin188 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP45559127
CSS125624
Markdown116024
JavaScript11013

PHP code Passed 2 tests

This is a very shot 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.18
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png50.09KB19.53KB▼ 61.01%