10% backtracks

Code Review | Backtracks

WordPress plugin Backtracks scored 10% from 54 tests.

About plugin

  • Plugin page: backtracks
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9
  • WordPress version: 5.9.2
  • First release: Mar 30, 2018
  • Latest release: Mar 30, 2018
  • Number of updates: 3
  • Update frequency: every 2.3 days
  • Top authors: backtracks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 454 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/backtracks/includes/api/backtracks-api.php+246
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.33MB] [CPU: ▲1,245.62ms] 75% from 4 tests

This is a short check of server-side resources used by Backtracks
The following require your attention
  • Extra CPU: Extra CPU usage should be kept under 200.00ms (currently 1,245.62ms on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1563.98 ▼16.62
Dashboard /wp-admin3.82 ▲0.422,130.12 ▲2,092.40
Posts /wp-admin/edit.php4.08 ▲0.442,107.66 ▲2,068.87
Add New Post /wp-admin/post-new.php7.30 ▲0.332,137.60 ▲886.74
Media Library /wp-admin/upload.php3.77 ▲0.472,070.84 ▲2,043.47

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 2 new options
New WordPress options
bt_settings_general
bt_settings_api

Browser metrics Passed 4 tests

Checking browser requirements for Backtracks
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,268 ▲51524.14 ▲8.9170.15 ▲63.892.26 ▼0.23
Dashboard /wp-admin3,389 ▲5327.28 ▲1.19170.77 ▲38.99178.62 ▲6.05
Posts /wp-admin/edit.php3,203 ▲5093.84 ▲0.6076.14 ▲8.62206.88 ▲57.13
Add New Post /wp-admin/post-new.php1,987 ▲32619.09 ▲3.24449.09 ▲24.65207.03 ▲43.91
Media Library /wp-admin/upload.php2,199 ▲5016.34 ▲0.75137.08 ▼11.09197.22 ▼43.12

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • License: No value
The official readme.txt is a good inspiration

backtracks/backtracks.php 85% from 13 tests

The main PHP script in "Backtracks" version 1.0.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin2,261 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP236207881,538
CSS22718485
JavaScript44911208
SVG10130

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity14.72
▷ Minimum class complexity1.00
▷ Maximum class complexity45.00
Average method complexity4.48
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes18
▷ Abstract classes211.11%
▷ Concrete classes1688.89%
▷ Final classes16.25%
Methods75
▷ Static methods1216.00%
▷ Public methods6688.00%
▷ Protected methods34.00%
▷ Private methods68.00%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin