84% featured-portfolio

Code Review | Featured Portfolio

WordPress plugin Featured Portfolio scored84%from 54 tests.

About plugin

  • Plugin page: featured-portfolio
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.5.2
  • WordPress version: 6.3.1
  • First release: May 10, 2016
  • Latest release: May 16, 2016
  • Number of updates: 9
  • Update frequency: every 0.7 days
  • Top authors: mandava (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /970 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.00MB] [CPU: ▼4.50ms] Passed 4 tests

A check of server-side resources used by Featured Portfolio
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0033.60 ▼4.71
Dashboard /wp-admin3.31 ▲0.0043.14 ▼4.44
Posts /wp-admin/edit.php3.36 ▲0.0045.95 ▼5.12
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.26 ▼3.71
Media Library /wp-admin/upload.php3.23 ▲0.0035.86 ▲2.98

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Featured Portfolio
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.26 ▼1.101.75 ▲0.1342.03 ▼7.19
Dashboard /wp-admin2,209 ▲185.84 ▲0.93109.27 ▲3.4641.79 ▼3.36
Posts /wp-admin/edit.php2,089 ▼31.98 ▼0.0240.07 ▲4.3534.15 ▼1.77
Add New Post /wp-admin/post-new.php1,547 ▲1418.34 ▼4.79591.49 ▼75.9269.55 ▲18.91
Media Library /wp-admin/upload.php1,391 ▲94.18 ▼0.0195.52 ▼3.4441.93 ▼3.95

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/featured-portfolio/includes/widget-class.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: genesis, widget, portfolio

featured-portfolio/featured-portfolio.php Passed 13 tests

The main file in "Featured Portfolio" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
109 characters long description:
Adds portfolio post type and a widget to display portfolio items with thumbnails. Requires Genesis Framework.

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
No dangerous file extensions were detected338 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP311092331
Markdown1407

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin