83% post-id-optimizer

Code Review | Post ID Optimizer

WordPress plugin Post ID Optimizer scored83%from 54 tests.

About plugin

  • Plugin page: post-id-optimizer
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.0.3
  • WordPress version: 6.3.1
  • First release: Jul 12, 2019
  • Latest release: Oct 26, 2022
  • Number of updates: 6
  • Update frequency: every 200.3 days
  • Top authors: pctricks.ir (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /486 total downloads

Benchmarks

Plugin footprint 82% 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: ▼7.25ms] Passed 4 tests

Server-side resources used by Post ID Optimizer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.53 ▼11.44
Dashboard /wp-admin3.50 ▲0.2054.02 ▲5.52
Posts /wp-admin/edit.php3.36 ▲0.0046.62 ▼0.27
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.90 ▼15.10
Media Library /wp-admin/upload.php3.23 ▲0.0034.37 ▼2.19

Server storage [IO: ▲0.22MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Please try to fix the following items
  • The plugin illegally modified 1 file (267.45KB) outside of "wp-content/plugins/post-id-optimizer/" and "wp-content/uploads/"
    • (modified) wp-includes/post.php
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Post ID Optimizer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.25 ▼0.981.86 ▲0.1340.60 ▼4.50
Dashboard /wp-admin2,209 ▲215.90 ▲0.0997.88 ▼19.0338.42 ▼7.62
Posts /wp-admin/edit.php2,089 ▲31.99 ▼0.0538.95 ▲2.8134.43 ▲0.71
Add New Post /wp-admin/post-new.php1,546 ▲2723.42 ▲0.50594.30 ▼67.1556.14 ▼0.61
Media Library /wp-admin/upload.php1,388 ▼04.30 ▲0.1593.56 ▼6.4541.98 ▼2.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

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
The following issues need your attention
  • 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/post-id-optimizer/postidoptimizer.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 86% 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
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === post-id-optimizer === )
You can look at the official readme.txt

post-id-optimizer/postidoptimizer.php 77% from 13 tests

"Post ID Optimizer" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("post-id-optimizer.php" instead of "postidoptimizer.php")
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
Success! There were no dangerous files found in this plugin3,202 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP27743,0043,202

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods4100.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions134
▷ Named functions134100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin