78% filtering-post

Code Review | Filtering Post

WordPress plugin Filtering Post scored78%from 54 tests.

About plugin

  • Plugin page: filtering-post
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5.2
  • WordPress version: 6.3.1
  • First release: Jun 23, 2016
  • Latest release: Jun 23, 2016
  • Number of updates: 2
  • Update frequency: every 3.0 days
  • Top authors: k2klettern (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /953 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.17ms] Passed 4 tests

An overview of server-side resources used by Filtering Post
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0340.46 ▼0.45
Dashboard /wp-admin3.33 ▼0.0145.18 ▼18.84
Posts /wp-admin/edit.php3.38 ▲0.0347.89 ▲2.50
Add New Post /wp-admin/post-new.php5.93 ▲0.0577.87 ▼15.87
Media Library /wp-admin/upload.php3.25 ▲0.0338.52 ▲5.82
Filtering Post /wp-admin/options-general.php?page=filtering-post/inc/class_fp.php3.2730.95

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Filtering Post
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲12613.57 ▼0.8613.80 ▲11.9752.09 ▲9.01
Dashboard /wp-admin2,206 ▲295.63 ▼0.0384.67 ▼0.9938.80 ▼2.69
Posts /wp-admin/edit.php2,108 ▲81.98 ▲0.0034.27 ▼1.0832.20 ▼2.85
Add New Post /wp-admin/post-new.php1,535 ▲723.05 ▼0.02679.91 ▲79.9265.54 ▲16.20
Media Library /wp-admin/upload.php1,405 ▲114.23 ▲0.0397.42 ▲2.8044.31 ▲0.21
Filtering Post /wp-admin/options-general.php?page=filtering-post/inc/class_fp.php8302.0126.3125.79

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/filtering-post/inc/class_fp.php
    • > /wp-content/plugins/filtering-post/inc/class_fpfunctions.php
    • > /wp-content/plugins/filtering-post/inc/optionsfp.php
    • > /wp-content/plugins/filtering-post/fp_plugin.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/filtering-post/inc/showpost-template.php on line 89

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (Administration Menu to create the views), #2 (Extended Options for each Shortcode Created), #3 (Adding a view Shortcode to a page.)
You can look at the official readme.txt

filtering-post/fp_plugin.php 92% from 13 tests

The main PHP script in "Filtering Post" version 1.0 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("filtering-post.php" instead of "fp_plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1,142 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript473241764
PHP74521277
CSS31312101

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.18
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.26MB with 0.17MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png74.38KB21.45KB▼ 71.16%
screenshot-2.png117.38KB34.22KB▼ 70.85%
screenshot-3.png56.64KB17.00KB▼ 70.00%
inc/img/no-img.png15.64KB8.68KB▼ 44.50%