84% tag-page-as-terms-of-use

Code Review | Tag Page As Terms Of Use

WordPress plugin Tag Page As Terms Of Use scored84%from 54 tests.

About plugin

  • Plugin page: tag-page-as-terms...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.0
  • WordPress version: 6.3.1
  • First release: Nov 4, 2014
  • Latest release: Nov 4, 2014
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: ludovic.roland (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

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

An overview of server-side resources used by Tag Page As Terms Of Use
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.87 ▼2.78
Dashboard /wp-admin3.31 ▲0.0049.04 ▼1.18
Posts /wp-admin/edit.php3.36 ▲0.0047.09 ▼2.27
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.09 ▼9.03
Media Library /wp-admin/upload.php3.23 ▲0.0042.88 ▲6.98

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Tag Page As Terms Of Use
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.201.75 ▼0.2245.06 ▲1.11
Dashboard /wp-admin2,198 ▲215.64 ▼0.0291.55 ▼0.0641.41 ▼1.98
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0040.18 ▲0.1635.26 ▼4.20
Add New Post /wp-admin/post-new.php1,526 ▼023.56 ▲0.35682.95 ▲83.4158.05 ▲14.22
Media Library /wp-admin/upload.php1,400 ▼34.14 ▼0.08118.83 ▲20.9849.60 ▲7.98

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tag-page-as-terms-of-use/tag-page-as-terms-of-use.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

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 to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The plugin in action (french)), #2 (The plugin in action (english))
The official readme.txt might help

tag-page-as-terms-of-use/tag-page-as-terms-of-use.php Passed 13 tests

The primary PHP file in "Tag Page As Terms Of Use" version 0.1 is used by WordPress to initiate all plugin functionality
88 characters long description:
Adds a meta box to the Edit Page page where you can tag a page as a "terms of use" page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin70 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP171126
Markdown113025
PO File12219

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 files were detected