84% tma-signature

Code Review | TMA-Signature

WordPress plugin TMA-Signature scored84%from 54 tests.

About plugin

  • Plugin page: tma-signature
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-4.9.0
  • WordPress version: 6.3.1
  • First release: Dec 7, 2017
  • Latest release: Dec 7, 2017
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: thmarx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.04MB] [CPU: ▼0.76ms] Passed 4 tests

An overview of server-side resources used by TMA-Signature
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0248.38 ▲11.19
Dashboard /wp-admin3.35 ▲0.0448.97 ▲2.15
Posts /wp-admin/edit.php3.40 ▲0.0444.08 ▼0.16
Add New Post /wp-admin/post-new.php5.95 ▲0.0679.65 ▼5.46
Media Library /wp-admin/upload.php3.27 ▲0.0436.60 ▲0.42
TMA Signature /wp-admin/options-general.php?page=my-setting-admin3.2431.71

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for TMA-Signature
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲11514.26 ▼0.091.70 ▲0.0644.95 ▲4.35
Dashboard /wp-admin2,282 ▲1015.82 ▲0.1196.69 ▼0.0939.62 ▼4.26
Posts /wp-admin/edit.php2,142 ▲422.91 ▲0.7840.58 ▲3.8432.59 ▼1.67
Add New Post /wp-admin/post-new.php1,721 ▲19524.13 ▲1.07674.99 ▼14.7154.97 ▼0.63
Media Library /wp-admin/upload.php1,484 ▲905.34 ▲1.1599.06 ▼7.4541.74 ▼3.20
TMA Signature /wp-admin/options-general.php?page=my-setting-admin9053.2762.3043.51

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/tma-signature/user.settings.php:78
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/tma-signature/settings.php:168
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/tma-signature/settings.php:168

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: analytics, behaviour targets, woocommerce, product targeting, tracking

tma-signature/tma-signature.php Passed 13 tests

The entry point to "TMA-Signature" version 1.0.0 is a PHP file that has certain tags in its header comment area
33 characters long description:
Adds a signature under every post

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected373 lines of code in 161 files:
LanguageFilesBlank linesComment linesLines of code
PHP33550203
JavaScript15810170

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity4.00
▷ Minimum class complexity3.00
▷ Maximum class complexity5.00
Average method complexity1.46
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin