83% custom-portfolio-with-filtering

Code Review | Custom Portfolio With Filtering

WordPress plugin Custom Portfolio With Filtering scored83%from 54 tests.

About plugin

  • Plugin page: custom-portfolio-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3
  • WordPress version: 6.3.1
  • First release: Nov 22, 2019
  • Latest release: Nov 22, 2019
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: mehtashail (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /524 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼12.11ms] Passed 4 tests

This is a short check of server-side resources used by Custom Portfolio With Filtering
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0642.04 ▲1.34
Dashboard /wp-admin3.36 ▲0.0145.16 ▼16.47
Posts /wp-admin/edit.php3.41 ▲0.0546.07 ▼8.84
Add New Post /wp-admin/post-new.php5.94 ▲0.0580.10 ▼24.45
Media Library /wp-admin/upload.php3.29 ▲0.0537.09 ▲2.73
Tags /wp-admin/edit-tags.php?taxonomy=tagportfolio&post_type=portfolio3.2831.91
Portfolio /wp-admin/edit.php?post_type=portfolio3.3345.03
Add New /wp-admin/post-new.php?post_type=portfolio3.4353.06

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Custom Portfolio With Filtering: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,939 ▲17813.44 ▼1.097.98 ▲6.4240.91 ▲1.04
Dashboard /wp-admin2,224 ▲505.59 ▲0.0291.23 ▲5.8138.82 ▼4.06
Posts /wp-admin/edit.php2,135 ▲352.03 ▲0.0539.85 ▲6.1237.50 ▼0.05
Add New Post /wp-admin/post-new.php1,561 ▲3023.04 ▼0.27644.35 ▼16.9656.71 ▲6.37
Media Library /wp-admin/upload.php1,429 ▲324.33 ▲0.1799.60 ▼5.9642.82 ▼3.94
Tags /wp-admin/edit-tags.php?taxonomy=tagportfolio&post_type=portfolio1,3062.1427.4729.43
Portfolio /wp-admin/edit.php?post_type=portfolio1,1471.9329.8632.09
Add New /wp-admin/post-new.php?post_type=portfolio2,6177.67170.9163.86

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/custom-portfolio-with-filtering/custom-portfolio-with-filter.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% 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:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === custom-portfolio-with-filtering === )
The official readme.txt might help

custom-portfolio-with-filtering/custom-portfolio-with-filter.php 85% from 13 tests

"Custom Portfolio With Filtering" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("custom-portfolio-with-filtering.php" instead of "custom-portfolio-with-filter.php")

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
Everything looks great! No dangerous files found in this plugin295 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP23922143
CSS116696
JavaScript1131056

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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
1 compressed PNG file occupies 0.01MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png6.89KB6.21KB▼ 9.82%