84% post-and-taxonomy-filter

Code Review | Post and Taxonomy Filter

WordPress plugin Post and Taxonomy Filter scored84%from 54 tests.

About plugin

  • Plugin page: post-and-taxonomy...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.1
  • WordPress version: 6.3.1
  • First release: Jan 31, 2018
  • Latest release: Apr 3, 2019
  • Number of updates: 5
  • Update frequency: every 88.0 days
  • Top authors: myasirhussain (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,856 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼1.69ms] Passed 4 tests

An overview of server-side resources used by Post and Taxonomy Filter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0844.67 ▲4.12
Dashboard /wp-admin3.38 ▲0.0751.95 ▲2.90
Posts /wp-admin/edit.php3.43 ▲0.0759.16 ▲8.09
Add New Post /wp-admin/post-new.php5.96 ▲0.0786.74 ▼15.90
Media Library /wp-admin/upload.php3.30 ▲0.0738.09 ▲2.14

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Post and Taxonomy Filter: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲12213.43 ▼0.939.20 ▲7.2443.21 ▼1.66
Dashboard /wp-admin2,191 ▲145.52 ▼0.1389.13 ▼2.0777.12 ▲37.66
Posts /wp-admin/edit.php2,114 ▲111.98 ▲0.0143.71 ▲6.6537.48 ▲4.55
Add New Post /wp-admin/post-new.php1,564 ▲3718.45 ▼4.60644.39 ▲33.53105.72 ▲49.09
Media Library /wp-admin/upload.php1,411 ▲144.20 ▼0.01100.79 ▼0.4271.96 ▲26.77

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

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
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/post-and-taxonomy-filter/post-and-taxonomy-filter.php:414

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% 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
Attributes that need to be fixed: You can look at the official readme.txt

post-and-taxonomy-filter/post-and-taxonomy-filter.php Passed 13 tests

This is the main PHP file of "Post and Taxonomy Filter" version 0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
39 characters long description:
Post and Taxonomy jQuery or Ajax Filter

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin738 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP19576361
CSS23711345
JavaScript210632

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions8
▷ Named functions8100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
post-taxonomy-filter.png0.95KB0.88KB▼ 7.72%