79% yydevelopment-portfolio-boxes

Code Review | Advanced Portfolio Gallery

WordPress plugin Advanced Portfolio Gallery scored79%from 54 tests.

About plugin

  • Plugin page: yydevelopment-por...
  • Plugin version: 1.4.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 24, 2020
  • Latest release: Aug 21, 2023
  • Number of updates: 37
  • Update frequency: every 33.7 days
  • Top authors: yydevelopment (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /3,126 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

An overview of server-side resources used by Advanced Portfolio Gallery
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0537.35 ▼8.78
Dashboard /wp-admin3.38 ▲0.0748.17 ▼4.70
Posts /wp-admin/edit.php3.49 ▲0.1355.76 ▲3.23
Add New Post /wp-admin/post-new.php5.96 ▲0.0789.12 ▼6.44
Media Library /wp-admin/upload.php3.30 ▲0.0737.29 ▲0.79

Server storage [IO: ▲0.17MB] [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: 28 new files
Database: 2 new tables, 8 new options
New tables
wp_yydev_portfolio_box
wp_yydev_portfolio_boxes
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
yydev_portfolioes_version
theysaidso_admin_options
yydev_portfolio_timestamp
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Portfolio Gallery
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7113.66 ▼1.031.68 ▼0.2039.70 ▼8.19
Dashboard /wp-admin2,218 ▲306.01 ▲1.1898.00 ▼8.8259.82 ▲17.15
Posts /wp-admin/edit.php2,104 ▲122.01 ▲0.0339.07 ▲1.9436.22 ▲3.69
Add New Post /wp-admin/post-new.php1,527 ▼617.66 ▼5.51782.82 ▲68.5462.11 ▲6.96
Media Library /wp-admin/upload.php1,397 ▲124.20 ▼0.0799.73 ▼4.3974.23 ▲26.04

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_yydev_portfolio_box
    • wp_yydev_portfolio_boxes
  • Zombie WordPress options were found after uninstall: 8 options
    • can_compress_scripts
    • yydev_portfolioes_version
    • theysaidso_admin_options
    • yydev_portfolio_timestamp
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Requires at least: Version not formatted correctly
Please take inspiration from this readme.txt

yydevelopment-portfolio-boxes/index.php 92% from 13 tests

"Advanced Portfolio Gallery" version 1.4.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("yydevelopment-portfolio-boxes.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin2,038 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP178234681,855
CSS12816139
PO File271244

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of 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.37
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%
Functions21
▷ Named functions21100.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
5 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/add-image.png12.71KB5.07KB▼ 60.12%
images/search-icon.png0.88KB0.85KB▼ 3.55%
images/delete-box.png0.64KB0.45KB▼ 29.75%
images/favicon.png0.37KB0.38KB0.00%
images/icon.png1.59KB1.63KB0.00%