84% tricks-forms

Code Review | Tricks & Forms

WordPress plugin Tricks & Forms scored 84% from 54 tests.

About plugin

  • Plugin page: tricks-forms
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.0-3.9.1
  • WordPress version: 6.3.1
  • First release: Aug 19, 2014
  • Latest release: Aug 19, 2014
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: Alfredo J P Barbosa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 504 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼0.29ms] Passed 4 tests

A check of server-side resources used by Tricks & Forms
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1049.05 ▲4.48
Dashboard /wp-admin3.40 ▲0.0954.33 ▲3.93
Posts /wp-admin/edit.php3.51 ▲0.1552.85 ▲2.85
Add New Post /wp-admin/post-new.php5.98 ▲0.0989.26 ▼11.76
Media Library /wp-admin/upload.php3.32 ▲0.0940.23 ▲3.82

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Tricks & Forms
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.32 ▼0.971.94 ▼0.3347.68 ▼1.68
Dashboard /wp-admin2,208 ▲204.91 ▼0.97112.31 ▼4.0646.00 ▼6.43
Posts /wp-admin/edit.php2,162 ▲762.04 ▲0.0038.33 ▲1.3439.94 ▲8.19
Add New Post /wp-admin/post-new.php1,535 ▲122.93 ▼0.03677.15 ▲16.7079.61 ▲19.06
Media Library /wp-admin/upload.php1,390 ▲54.22 ▲0.07111.42 ▼14.0347.60 ▼3.38

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Almost there! Just fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function tf_add_custom_box() in wp-content/plugins/tricks-forms/examples.php:154
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tricks-forms/functions.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tricks-forms/functions.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tricks-forms/functions.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: custom forms, custom options screens, custom profiles, custom posts

tricks-forms/tricks-forms.php Passed 13 tests

The main PHP file in "Tricks & Forms" ver. 1.3 adds more information about the plugin and also serves as the entry point for this plugin
59 characters long description:
Custom posts, profiles and options fields and custom forms.

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 plugin608 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP417394569
CSS10035
JavaScript1014

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions46
▷ Named functions4597.83%
▷ Anonymous functions12.17%
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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
no-image.PNG30.81KB13.30KB▼ 56.82%