78% codeincept-portfolio

Code Review | Codeincept Portfolio

WordPress plugin Codeincept Portfolio scored78%from 54 tests.

About plugin

  • Plugin page: codeincept-portfolio
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Mar 13, 2018
  • Latest release: Sep 14, 2018
  • Number of updates: 5
  • Update frequency: every 37.0 days
  • Top authors: codeincept (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /1,511 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▼11.57ms] Passed 4 tests

An overview of server-side resources used by Codeincept Portfolio
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.3246.37 ▼2.72
Dashboard /wp-admin3.86 ▲0.2353.35 ▼14.60
Posts /wp-admin/edit.php3.91 ▲0.2352.68 ▼6.49
Add New Post /wp-admin/post-new.php6.41 ▲0.2696.57 ▼22.47
Media Library /wp-admin/upload.php3.72 ▲0.2342.39 ▲4.17
Category /wp-admin/edit-tags.php?taxonomy=portfolio_category&post_type=advanced-portfolio3.7238.70
Add Portfolio /wp-admin/edit.php?post_type=advanced-portfolio3.8353.87
Portfolio Shortcodes /wp-admin/edit.php?post_type=advportfolios3.8341.69
Tags /wp-admin/edit-tags.php?taxonomy=portfolio_tags&post_type=advanced-portfolio3.7139.44
Settings /wp-admin/edit.php?post_type=advanced-portfolio&page=portfolio-settings3.7137.36

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Codeincept Portfolio
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,951 ▲20513.92 ▼0.7510.58 ▲8.8942.26 ▼0.01
Dashboard /wp-admin2,232 ▲555.62 ▲0.0191.07 ▼0.9440.80 ▼2.42
Posts /wp-admin/edit.php2,143 ▲402.03 ▼0.0038.85 ▼4.4431.76 ▼6.52
Add New Post /wp-admin/post-new.php1,559 ▲2723.11 ▼0.13676.92 ▲42.3057.55 ▲10.61
Media Library /wp-admin/upload.php1,440 ▲404.38 ▲0.0599.86 ▼7.2844.70 ▼1.16
Category /wp-admin/edit-tags.php?taxonomy=portfolio_category&post_type=advanced-portfolio1,3142.1629.0228.47
Add Portfolio /wp-admin/edit.php?post_type=advanced-portfolio1,1351.9431.4033.16
Portfolio Shortcodes /wp-admin/edit.php?post_type=advportfolios1,1201.9730.9631.63
Tags /wp-admin/edit-tags.php?taxonomy=portfolio_tags&post_type=advanced-portfolio1,2862.3127.1031.49
Settings /wp-admin/edit.php?post_type=advanced-portfolio&page=portfolio-settings8662.0423.9326.36

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 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
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/codeincept-portfolio/admin/portfolio/filterable.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/codeincept-portfolio/admin/class-advanced-portfolio-metaboxes.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/codeincept-portfolio/public/portfolio/simple.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/codeincept-portfolio/public/portfolio/one_row_slider.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/codeincept-portfolio/public/portfolio/filterable.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_post_thumbnail() in wp-content/plugins/codeincept-portfolio/public/portfolio/single_item.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
8 plugin tags: advanced portfolio, codeincept, portfolio, portfolio plugin, codeincept portfolio...

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

The main file in "Codeincept Portfolio" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected3,610 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
CSS11134921,438
PHP172385661,274
HTML1110343
JavaScript7776297
JSON100202
SVG232056

PHP code Passed 2 tests

Analyzing 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.41
Average class complexity14.67
▷ Minimum class complexity1.00
▷ Maximum class complexity72.00
Average method complexity3.32
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods53
▷ Static methods23.77%
▷ Public methods4890.57%
▷ Protected methods00.00%
▷ Private methods59.43%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
31 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/js/skins/default/lightbox-navnext.png0.45KB0.35KB▼ 21.40%
public/js/skins/default/lightbox-next-fullscreen.png0.32KB0.20KB▼ 36.59%
public/js/skins/default/html5boxplayer_fullscreen.png1.84KB1.57KB▼ 14.98%
public/js/skins/default/html5boxplayer_hd.png1.46KB1.59KB0.00%
public/js/skins/default/lightbox-prev.png0.34KB0.15KB▼ 55.40%