84% reftagger-toggle

Code Review | RefTagger Toggle

WordPress plugin RefTagger Toggle scored84%from 54 tests.

About plugin

  • Plugin page: reftagger-toggle
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 18, 2016
  • Latest release: May 18, 2016
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: jtsternberg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /865 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by RefTagger Toggle
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.27 ▼7.21
Dashboard /wp-admin3.31 ▼0.0442.77 ▼19.47
Posts /wp-admin/edit.php3.36 ▲0.0046.68 ▲0.72
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.16 ▼3.23
Media Library /wp-admin/upload.php3.23 ▲0.0032.91 ▼3.16

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for RefTagger Toggle
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5414.48 ▼0.201.95 ▼0.0539.12 ▼4.31
Dashboard /wp-admin2,209 ▲215.90 ▲1.01107.17 ▼9.9340.68 ▼6.96
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0039.92 ▲1.1735.13 ▼1.76
Add New Post /wp-admin/post-new.php1,533 ▼023.06 ▲0.01639.27 ▲44.9763.40 ▲5.45
Media Library /wp-admin/upload.php1,391 ▲64.22 ▼0.0296.53 ▼6.7148.78 ▲4.30

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/reftagger-toggle/reftagger-toggle.php:316

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

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Requires at least: The plugin version is formatted incorrectly
You can take inspiration from this readme.txt

reftagger-toggle/reftagger-toggle.php Passed 13 tests

The main PHP file in "RefTagger Toggle" ver. 0.1.0 adds more information about the plugin and also serves as the entry point for this plugin
51 characters long description:
Allows disabling Reftagger on a per-page/post basis

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
Good job! No executable or dangerous file extensions detected105 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP134180105

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods15
▷ Static methods213.33%
▷ Public methods1493.33%
▷ Protected methods16.67%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin