84% modern-portfolio

Code Review | Modern Portfolio

WordPress plugin Modern Portfolio scored84%from 54 tests.

About plugin

  • Plugin page: modern-portfolio
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.1-4.9
  • WordPress version: 6.3.1
  • First release: Oct 29, 2018
  • Latest release: May 27, 2020
  • Number of updates: 74
  • Update frequency: every 7.8 days
  • Top authors: mostafadeveloper (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

A check of server-side resources used by Modern Portfolio
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1236.16 ▼1.83
Dashboard /wp-admin3.41 ▲0.0743.90 ▼18.59
Posts /wp-admin/edit.php3.46 ▲0.1148.38 ▲1.43
Add New Post /wp-admin/post-new.php5.99 ▲0.1188.17 ▼10.42
Media Library /wp-admin/upload.php3.33 ▲0.1133.22 ▼2.78

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_modport_modern_portfolio
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Modern Portfolio
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.24 ▼1.311.80 ▲0.1840.22 ▲2.31
Dashboard /wp-admin2,203 ▲155.79 ▼0.1797.73 ▼17.8440.28 ▼5.95
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0340.04 ▲1.6734.81 ▲0.12
Add New Post /wp-admin/post-new.php1,535 ▼722.90 ▲4.54612.36 ▼1.6270.87 ▲21.41
Media Library /wp-admin/upload.php1,382 ▼04.19 ▲0.0397.73 ▲1.9740.24 ▼4.27

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_modport_modern_portfolio
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

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)
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/modern-portfolio/modern-portfolio.php:27

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: tags, categories, widget, posts, portfolio...

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

The main PHP file in "Modern Portfolio" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
94 characters long description:
The Modern Portfolio is a simple widget to show posts as portfolios based on different filters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin678 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP22248343
CSS1388257
JavaScript28577
HTML1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity81.00
▷ Minimum class complexity81.00
▷ Maximum class complexity81.00
Average method complexity12.43
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.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
No PNG files were detected