83% easy-portfolio

Code Review | Easy Portfolio

WordPress plugin Easy Portfolio scored83%from 54 tests.

About plugin

  • Plugin page: easy-portfolio
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.0
  • WordPress version: 6.3.1
  • First release: May 15, 2014
  • Latest release: Dec 7, 2018
  • Number of updates: 33
  • Update frequency: every 50.5 days
  • Top authors: tushar44u (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

500+ active /36,845 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼4.81ms] Passed 4 tests

A check of server-side resources used by Easy Portfolio
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1041.14 ▲1.39
Dashboard /wp-admin3.39 ▲0.0852.40 ▲3.47
Posts /wp-admin/edit.php3.44 ▲0.0950.81 ▼5.79
Add New Post /wp-admin/post-new.php5.97 ▲0.0986.30 ▼18.31
Media Library /wp-admin/upload.php3.32 ▲0.0941.31 ▲4.92
Portfolio Category /wp-admin/edit-tags.php?taxonomy=portfolio_category&post_type=portfolio3.3138.71
Easy Portfolio /wp-admin/edit.php?post_type=portfolio3.3638.50
Add Portfolio Item /wp-admin/post-new.php?post_type=portfolio3.4754.43

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Easy Portfolio
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,939 ▲17813.50 ▼1.1011.49 ▲9.7540.25 ▼1.64
Dashboard /wp-admin2,226 ▲465.62 ▲0.0183.49 ▼6.0338.99 ▼4.75
Posts /wp-admin/edit.php2,131 ▲312.03 ▲0.0036.64 ▼0.2932.08 ▼4.83
Add New Post /wp-admin/post-new.php1,552 ▲2623.33 ▼0.14689.45 ▲20.5552.04 ▲1.25
Media Library /wp-admin/upload.php1,431 ▲284.11 ▼0.05112.12 ▲8.9047.33 ▲5.12
Portfolio Category /wp-admin/edit-tags.php?taxonomy=portfolio_category&post_type=portfolio1,3082.1231.2531.78
Easy Portfolio /wp-admin/edit.php?post_type=portfolio1,1191.9731.4638.00
Add Portfolio Item /wp-admin/post-new.php?post_type=portfolio2,4137.71183.8570.31

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Almost there! Just fix the following items
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-portfolio/inc/add_custom_field.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-portfolio/inc/add_custom_field.php:53
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/easy-portfolio/easy-portfolio.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/easy-portfolio/themes/default_template.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/easy-portfolio/themes/portfolio_details.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_terms() in wp-content/plugins/easy-portfolio/themes/category_template.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (16 tag instead of maximum 10)
  • Screenshots: These screenshots do not have images: #1 (Overview List Of Portfolio/Project are shows and also can manage list of Portfolio items.), #2 (Adding New Category.), #3 (Adding New Portfolio/project.), #4 (Show frontend All Portfolio/project (theme twentytwelve).), #5 (Selected Category Portfolio/project (theme twentytwelve) Are Show.), #6 (Latest Portfolio/project is show Column(theme twentytwelve). //Category filter are not available.), #7 (Latest Portfolio/project is show in list orders(theme twentytwelve). //Category filter are not available.), #8 (Portfolio/project Details page are show.)
  • Donate link: Please fix this invalid url: "#"
The official readme.txt might help

easy-portfolio/easy-portfolio.php 92% from 13 tests

The main PHP file in "Easy Portfolio" ver. 1.3 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 154 characters long)

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
No dangerous file extensions were detected823 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS242435
PHP5830384
JavaScript4004

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/zoom_icon.png1.04KB0.95KB▼ 8.18%
images/prettyPhoto/light_square/sprite.png3.42KB2.13KB▼ 37.67%
images/prettyPhoto/light_square/btnPrevious.png1.41KB1.19KB▼ 15.74%
images/link_post_icon.png0.73KB0.65KB▼ 11.36%
images/prettyPhoto/light_square/btnNext.png1.38KB1.14KB▼ 17.29%