79% oktopost-tracking-code

Code Review | Oktopost Tracking Code

WordPress plugin Oktopost Tracking Code scored79%from 54 tests.

About plugin

  • Plugin page: oktopost-tracking...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.7
  • WordPress version: 6.3.1
  • First release: Jan 17, 2016
  • Latest release: Oct 20, 2021
  • Number of updates: 6
  • Update frequency: every 350.8 days
  • Top authors: oktopost (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,222 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.55ms] Passed 4 tests

An overview of server-side resources used by Oktopost Tracking Code
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0145.44 ▲4.50
Dashboard /wp-admin3.32 ▲0.0151.12 ▼0.29
Posts /wp-admin/edit.php3.37 ▲0.0150.11 ▲3.69
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.62 ▼6.28
Media Library /wp-admin/upload.php3.24 ▲0.0134.64 ▼3.31
Oktopost /wp-admin/options-general.php?page=oktopost-plugin3.2131.50

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Oktopost Tracking Code
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.33 ▲0.051.72 ▼0.4745.34 ▲4.24
Dashboard /wp-admin2,202 ▲255.65 ▲0.0894.97 ▲3.9941.99 ▼0.48
Posts /wp-admin/edit.php2,107 ▲101.99 ▼0.0036.00 ▲0.2834.04 ▼3.23
Add New Post /wp-admin/post-new.php1,529 ▲323.05 ▲0.07664.00 ▼29.8058.39 ▲3.52
Media Library /wp-admin/upload.php1,401 ▲14.15 ▼0.0699.92 ▼14.3143.34 ▼2.89
Oktopost /wp-admin/options-general.php?page=oktopost-plugin8192.0425.5728.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/oktopost-tracking-code/includes/tracking-code.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: accountId in wp-content/plugins/oktopost-tracking-code/includes/tracking-code.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/oktopost-tracking-code/oktopost-tracking-code.php:17
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/oktopost-tracking-code/includes/admin-page.php:4

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: tracking code, oktopost, social media, social media publishing

oktopost-tracking-code/oktopost-tracking-code.php Passed 13 tests

"Oktopost Tracking Code" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
75 characters long description:
Automatically append the Oktopost tracking code to your WordPress template.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin108 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP32526108

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods685.71%
▷ Protected methods00.00%
▷ Private methods114.29%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin