72% tt-guest-post-submit

Code Review | TT Guest Post Submit

WordPress plugin TT Guest Post Submit scored72%from 54 tests.

About plugin

  • Plugin page: tt-guest-post-submit
  • Plugin version: 4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.4
  • WordPress version: 6.3.1
  • First release: Mar 26, 2014
  • Latest release: Apr 21, 2017
  • Number of updates: 56
  • Update frequency: every 20.1 days
  • Top authors: rashed.latif (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

200+ active /18,422 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼5.66ms] Passed 4 tests

Server-side resources used by TT Guest Post Submit
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1639.19 ▲0.08
Dashboard /wp-admin3.50 ▲0.1650.35 ▼15.65
Posts /wp-admin/edit.php3.62 ▲0.2646.21 ▲0.79
Add New Post /wp-admin/post-new.php6.08 ▲0.2089.04 ▼7.87
Media Library /wp-admin/upload.php3.43 ▲0.2037.45 ▲1.90
TT Guest Post Submit /wp-admin/options-general.php?page=tt-guest-post-submit/tt-guest-post-submit.php3.3734.15

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

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

Browser metrics Passed 4 tests

Checking browser requirements for TT Guest Post Submit
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲5314.35 ▲0.381.72 ▲0.0539.11 ▼1.62
Dashboard /wp-admin2,198 ▲175.64 ▼0.0586.30 ▼16.7436.55 ▼5.68
Posts /wp-admin/edit.php2,109 ▲92.01 ▲0.0637.01 ▼0.1031.95 ▼7.65
Add New Post /wp-admin/post-new.php1,531 ▲323.11 ▲0.14622.59 ▲30.4474.36 ▲16.16
Media Library /wp-admin/upload.php1,403 ▲64.19 ▼0.0199.07 ▼3.0845.03 ▲1.03
TT Guest Post Submit /wp-admin/options-general.php?page=tt-guest-post-submit/tt-guest-post-submit.php1,6052.0023.1238.69

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

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 27 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=tt-guest-post-submit/tt-guest-post-submit.php
    • > Notice in wp-content/plugins/tt-guest-post-submit/tt-guest-post-submit.php+191
    Undefined variable: disabled
  • 46 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=tt-guest-post-submit/tt-guest-post-submit.php
    • > Notice in wp-content/plugins/tt-guest-post-submit/tt-guest-post-submit.php+193
    Trying to access array offset on value of type bool
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=tt-guest-post-submit/tt-guest-post-submit.php
    • > Notice in wp-content/plugins/tt-guest-post-submit/tt-guest-post-submit.php+154
    Undefined variable: second_field
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=tt-guest-post-submit/tt-guest-post-submit.php
    • > Notice in wp-content/plugins/tt-guest-post-submit/tt-guest-post-submit.php+222
    Undefined variable: lite
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=tt-guest-post-submit/tt-guest-post-submit.php
    • > Notice in wp-content/plugins/tt-guest-post-submit/tt-guest-post-submit.php+152
    Undefined variable: size

SRP 0% 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/tt-guest-post-submit/EasyCaptcha/samplecode.php
    • > /wp-content/plugins/tt-guest-post-submit/EasyCaptcha/easycaptcha.php
  • 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/tt-guest-post-submit/tt-guest-post-submit.php:403

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (20 tag instead of maximum 10)
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === tt-guest-post-submit === )
  • Screenshots: Please add images for these screenshots: #2 (TTGPS-LITE-General Settings Options), #3 (TTGPS-LITE-Other Options), #4 (TTGPS-FULL-General Settings Options), #5 (TTGPS-FULL-Other Options)
The official readme.txt might help

tt-guest-post-submit/tt-guest-post-submit.php Passed 13 tests

"TT Guest Post Submit" version 4.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
76 characters long description:
Enables your visitors to submit posts and images from anywhere on your site.

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 plugin1,938 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PO File7350350889
PHP6181182776
CSS1315251
XML11922

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity56.00
▷ Minimum class complexity41.00
▷ Maximum class complexity71.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods40
▷ Static methods00.00%
▷ Public methods40100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants16100.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
15 PNG files occupy 0.36MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-5.PNG56.17KB22.75KB▼ 59.49%
assets/screenshot-3.PNG73.84KB25.72KB▼ 65.16%
images/tags.png0.76KB0.72KB▼ 5.30%
assets/screenshot-2.PNG50.15KB19.89KB▼ 60.33%
images/screenshot-1.png20.01KB10.76KB▼ 46.23%