90% portfolio-and-projects

Code Review | Portfolio and Projects

WordPress plugin Portfolio and Projects scored90%from 54 tests.

About plugin

  • Plugin page: portfolio-and-pro...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 2, 2017
  • Latest release: Nov 27, 2023
  • Number of updates: 49
  • Update frequency: every 51.4 days
  • Top authors: wponlinesupport (55.1%)anoopranawat (46.94%)

Code review

54 tests

User reviews

11 reviews

Install metrics

2,000+ active /59,551 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.39MB] [CPU: ▼3.37ms] Passed 4 tests

Analyzing server-side resources used by Portfolio and Projects
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.3437.08 ▼4.89
Dashboard /wp-admin3.75 ▲0.4447.67 ▼1.29
Posts /wp-admin/edit.php3.80 ▲0.4550.20 ▲1.80
Add New Post /wp-admin/post-new.php6.29 ▲0.4086.80 ▼9.08
Media Library /wp-admin/upload.php3.61 ▲0.3835.78 ▲4.96

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 54 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
wpos_anylc_site_uid
widget_theysaidso_widget
wpos_anylc_redirect

Browser metrics Passed 4 tests

A check of browser resources used by Portfolio and Projects
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,546 ▼1,21613.53 ▼0.831.45 ▼0.2816.33 ▼27.70
Dashboard /wp-admin2,221 ▲435.54 ▼0.1598.35 ▼14.7652.70 ▲8.28
Posts /wp-admin/edit.php2,122 ▲252.01 ▲0.0540.29 ▲2.6334.11 ▼1.01
Add New Post /wp-admin/post-new.php1,546 ▲2023.42 ▲0.16624.27 ▼22.1031.18 ▼31.64
Media Library /wp-admin/upload.php1,425 ▲254.24 ▼0.01106.07 ▲6.2941.70 ▼1.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • wpos_anylc_site_uid
    • widget_recent-posts
    • wpos_anylc_redirect
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: You are using too many tags: 19 tag instead of maximum 10
You can look at the official readme.txt

portfolio-and-projects/portfolio-and-projects.php Passed 13 tests

"Portfolio and Projects" version 1.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
87 characters long description:
Display Portfolio OR Projects in a grid view. Also work with Gutenberg shortcode block.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin3,164 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP246948872,597
JavaScript611161390
CSS5108176
JSON1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity18.50
▷ Minimum class complexity3.00
▷ Maximum class complexity87.00
Average method complexity3.92
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes225.00%
Methods48
▷ Static methods24.17%
▷ Public methods4491.67%
▷ Protected methods00.00%
▷ Private methods48.33%
Functions40
▷ Named functions40100.00%
▷ Anonymous functions00.00%
Constants18
▷ Global constants18100.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
14 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
wpos-analytics/assets/images/wpos-logo.png9.04KB3.17KB▼ 64.91%
assets/images/utility-50.png1.64KB0.82KB▼ 50.30%
assets/images/SlidersPack-50.png6.48KB2.79KB▼ 56.91%
wpos-plugins/assets/images/cart-2.png2.20KB1.82KB▼ 17.38%
wpos-plugins/assets/images/utility-icon.png0.72KB0.82KB0.00%