84% js-post-filter

Code Review | JS Post Filter

WordPress plugin JS Post Filter scored 84% from 54 tests.

About plugin

  • Plugin page: js-post-filter
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.1
  • WordPress version: 6.3.1
  • First release: Dec 14, 2017
  • Latest release: Dec 14, 2017
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: neeyash (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 494 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

An overview of server-side resources used by JS Post Filter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.87 ▼0.12
Dashboard /wp-admin3.32 ▲0.0244.62 ▼7.70
Posts /wp-admin/edit.php3.37 ▲0.0249.16 ▼2.02
Add New Post /wp-admin/post-new.php5.90 ▲0.0284.06 ▼12.11
Media Library /wp-admin/upload.php3.24 ▲0.0136.82 ▲1.41

Server storage [IO: ▲0.04MB] [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: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by JS Post Filter
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲17314.10 ▼0.275.49 ▲3.8044.38 ▲2.12
Dashboard /wp-admin2,206 ▲185.79 ▼0.1196.30 ▼16.6739.00 ▼1.40
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0439.83 ▼0.7034.44 ▲1.72
Add New Post /wp-admin/post-new.php1,528 ▼618.76 ▼4.42652.61 ▼25.6860.79 ▲2.79
Media Library /wp-admin/upload.php1,385 ▼64.23 ▲0.0194.91 ▼14.4340.70 ▼8.41

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/js-post-filter/js-post-filter.php:35

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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
These attributes need to be fixed:
  • Contributors: Plugin contributors field is missing
  • Screenshots: These screenshots lack descriptions #2, #3 in js-post-filter/assets to your readme.txt
You can look at the official readme.txt

js-post-filter/js-post-filter.php Passed 13 tests

The main PHP script in "JS Post Filter" version 1.0 is automatically included on every request by WordPress
46 characters long description:
A plugin for filter the post based on it type.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin62 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1211862

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Functions6
▷ Named functions6100.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