83% awesome-portfolio

Code Review | Awesome Portfolio

WordPress plugin Awesome Portfolio scored83%from 54 tests.

About plugin

  • Plugin page: awesome-portfolio
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.0.2
  • WordPress version: 6.3.1
  • First release: Nov 11, 2018
  • Latest release: Jan 8, 2019
  • Number of updates: 16
  • Update frequency: every 3.6 days
  • Top authors: smahs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /546 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
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.07ms] Passed 4 tests

This is a short check of server-side resources used by Awesome Portfolio
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0543.47 ▼0.33
Dashboard /wp-admin3.34 ▲0.0347.07 ▲2.40
Posts /wp-admin/edit.php3.39 ▲0.0347.22 ▼0.69
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.30 ▼22.94
Media Library /wp-admin/upload.php3.26 ▲0.0338.89 ▼0.30
Add New portfolio /wp-admin/post-new.php?post_type=awesome_portfolio3.3850.67
awesome portfolio category /wp-admin/edit-tags.php?taxonomy=awesomeportfolio&post_type=awesome_portfolio3.2538.55
All portfolio /wp-admin/edit.php?post_type=awesome_portfolio3.3034.86

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Awesome Portfolio
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,952 ▲21713.71 ▼0.6012.67 ▲10.7648.98 ▲4.25
Dashboard /wp-admin2,234 ▲434.85 ▼0.04114.04 ▼0.1843.67 ▼1.23
Posts /wp-admin/edit.php2,120 ▲312.01 ▼0.0137.36 ▼3.4935.51 ▲1.71
Add New Post /wp-admin/post-new.php1,559 ▲4021.01 ▼2.65669.54 ▼54.4957.24 ▼16.43
Media Library /wp-admin/upload.php1,419 ▲344.11 ▼0.10111.70 ▼1.5649.42 ▲0.67
Add New portfolio /wp-admin/post-new.php?post_type=awesome_portfolio2,2747.55208.5776.66
awesome portfolio category /wp-admin/edit-tags.php?taxonomy=awesomeportfolio&post_type=awesome_portfolio1,2902.1735.2039.53
All portfolio /wp-admin/edit.php?post_type=awesome_portfolio1,1011.9532.6031.67

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following items
  • 1× 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/awesome-portfolio/awesome_portfolio.php:73

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • License uri: Please fix this invalid URI: "License URI: http://www.gnu.org/licenses/gpl-2.0.html"
You can take inspiration from this readme.txt

awesome-portfolio/awesome_portfolio.php 77% from 13 tests

"Awesome Portfolio" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("awesome-portfolio.php" instead of "awesome_portfolio.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Description: Please don't use more than 140 characters for the plugin description (currently 144 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin7,384 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS2997907,149
PHP13816156
JavaScript4183679

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Methods2
▷ Static methods00.00%
▷ Public methods2100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected