68% post-requirements

Code Review | Post Requirements

WordPress plugin Post Requirements scored 68% from 54 tests.

About plugin

  • Plugin page: post-requirements
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.0-4.6
  • WordPress version: 6.3.1
  • First release: Sep 28, 2012
  • Latest release: Aug 3, 2016
  • Number of updates: 10
  • Update frequency: every 140.5 days
  • Top authors: carestad (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,356 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.90MB] [CPU: ▼36.09ms] Passed 4 tests

Server-side resources used by Post Requirements
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0245.40 ▲2.75
Dashboard /wp-admin3.05 ▼0.2622.76 ▼25.90
Posts /wp-admin/edit.php3.05 ▼0.3125.45 ▼23.02
Add New Post /wp-admin/post-new.php3.05 ▼2.8423.68 ▼82.99
Media Library /wp-admin/upload.php3.05 ▼0.1822.36 ▼12.44
Post Requirements /wp-admin/options-general.php?page=postreq3.0523.62

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Post Requirements
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.22 ▼1.401.57 ▼0.8537.38 ▼16.31
Dashboard /wp-admin2,210 ▲245.78 ▲0.70100.74 ▼9.5239.26 ▼1.15
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0637.72 ▲2.1235.11 ▲3.32
Add New Post /wp-admin/post-new.php1,527 ▲823.20 ▼0.28671.14 ▲33.3151.06 ▼0.33
Media Library /wp-admin/upload.php1,389 ▲44.27 ▲0.0393.20 ▼9.6341.98 ▼3.67
Post Requirements /wp-admin/options-general.php?page=postreq7872.0623.5826.38

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/post-requirements/postreq.php+74
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=postreq
    • > Deprecated in wp-content/plugins/post-requirements/postreq.php+74
    Function create_function() is deprecated

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/post-requirements/postreq.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === post-requirements === )
You can take inspiration from this readme.txt

post-requirements/postreq.php 85% from 13 tests

The main PHP file in "Post Requirements" ver. 1.1.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("post-requirements.php" instead of "postreq.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin130 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12524112
PO File15718

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.38
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods675.00%
▷ Protected methods00.00%
▷ Private methods225.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin