94% require-post-tags

Code Review | Require Post Tags

WordPress plugin Require Post Tags scored 94% from 53 tests.

About plugin

  • Plugin page: require-post-tags
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9
  • WordPress version: 5.8.1
  • First release: Oct 5, 2013
  • Latest release: Nov 16, 2017
  • Number of updates: 9
  • Update frequency: every 167.1 days
  • Top authors: joshhartman (100%)

Code review

53 tests

User reviews

2 reviews

Install metrics

90+ active / 1,725 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

An overview of server-side resources used by Require Post Tags
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1232.34 ▲12.33
Dashboard /wp-admin3.06 ▲0.0142.64 ▼0.85
Posts /wp-admin/edit.php3.11 ▲0.0145.07 ▲3.44
Add New Post /wp-admin/post-new.php5.42 ▼0.0191.52 ▼1,051.42
Media Library /wp-admin/upload.php3.00 ▼0.0033.68 ▼7.42

Server storage [IO: ▲0.05MB] [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, no new options

Browser metrics Passed 4 tests

Require Post Tags: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,673 ▲9116.14 ▲0.639.63 ▲0.6443.48 ▼1.20
Dashboard /wp-admin2,933 ▲835.95 ▲0.08157.17 ▲4.15105.61 ▲0.94
Posts /wp-admin/edit.php2,706 ▼02.68 ▼0.0166.48 ▼1.7385.76 ▼3.04
Add New Post /wp-admin/post-new.php2,057 ▲38916.44 ▼2.19388.28 ▲38.39107.36 ▼4.06
Media Library /wp-admin/upload.php1,775 ▲64.99 ▼0.03149.28 ▼3.65107.30 ▼6.74

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 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/require-post-tags/require-post-tags.php:28

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (Alert appears when you try to save a post without adding at least one tag)
The official readme.txt might help

require-post-tags/require-post-tags.php Passed 13 tests

"Require Post Tags" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
79 characters long description:
Require users to add at least one post tag before saving a draft or publishing.

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
Everything looks great! No dangerous files found in this plugin35 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP152235

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.05MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png46.55KB45.64KB▼ 1.96%