84% post-tracking-code

Code Review | Post tracking code

WordPress plugin Post tracking code scored84%from 54 tests.

About plugin

  • Plugin page: post-tracking-code
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 4, 2021
  • Latest release: Nov 4, 2021
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: imanabuhaydari (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /254 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.77ms] Passed 4 tests

An overview of server-side resources used by Post tracking code
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.07 ▼6.63
Dashboard /wp-admin3.31 ▲0.0146.95 ▼3.62
Posts /wp-admin/edit.php3.36 ▲0.0047.30 ▼0.63
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.22 ▼7.71
Media Library /wp-admin/upload.php3.23 ▲0.0035.03 ▼1.12

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Post tracking code
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.26 ▼0.981.65 ▼0.1241.79 ▼0.37
Dashboard /wp-admin2,206 ▲185.85 ▲0.97106.90 ▼1.2841.05 ▼1.05
Posts /wp-admin/edit.php2,092 ▲32.12 ▲0.1139.06 ▲3.7435.31 ▲2.33
Add New Post /wp-admin/post-new.php1,535 ▲123.16 ▼0.06666.87 ▼3.9757.12 ▼6.56
Media Library /wp-admin/upload.php1,385 ▼64.20 ▼0.0493.82 ▼7.4443.62 ▲0.14

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

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 | 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_action() in wp-content/plugins/post-tracking-code/post-tracking-code.php:20

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: post-tracking-code, order-tracking-page, tracking-code, add-woocommerce-tracking-code, tracking-form-page

post-tracking-code/post-tracking-code.php 85% from 13 tests

The principal PHP file in "Post tracking code" v. 1.0.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected111 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12724111

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
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
PNG images were not found in this plugin