72% portfolio-by-lisa-westlund

Code Review | Portfolio Plugin

WordPress plugin Portfolio Plugin scored72%from 54 tests.

About plugin

  • Plugin page: portfolio-by-lisa...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 2, 2015
  • Latest release: Jun 5, 2015
  • Number of updates: 10
  • Update frequency: every 0.3 days
  • Top authors: lisa_westlund (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,038 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.47ms] Passed 4 tests

Analyzing server-side resources used by Portfolio Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0245.88 ▲1.44
Dashboard /wp-admin3.33 ▲0.0352.05 ▼0.62
Posts /wp-admin/edit.php3.38 ▲0.0253.89 ▼2.06
Add New Post /wp-admin/post-new.php5.91 ▲0.0390.10 ▼14.26
Media Library /wp-admin/upload.php3.25 ▲0.0238.73 ▼0.92
Instagram Portfolio /wp-admin/options-general.php?page=instagram-portfolio3.2333.06

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Portfolio Plugin: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6314.67 ▲0.321.85 ▲0.1342.04 ▼2.12
Dashboard /wp-admin2,204 ▲245.61 ▼0.0586.02 ▼6.7439.58 ▼4.31
Posts /wp-admin/edit.php2,106 ▲32.02 ▲0.0340.64 ▼5.7834.53 ▼0.66
Add New Post /wp-admin/post-new.php1,534 ▲623.17 ▼0.04637.73 ▼36.7052.05 ▼3.78
Media Library /wp-admin/upload.php1,409 ▲124.19 ▼0.0196.70 ▼9.8444.65 ▼7.06
Instagram Portfolio /wp-admin/options-general.php?page=instagram-portfolio9522.1222.8528.05

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=instagram-portfolio
    • > Notice in wp-content/plugins/portfolio-by-lisa-westlund/inc/options-page-wrapper.php+34
    Undefined variable: wplw_instagram_access_token
    • > GET request to /wp-admin/options-general.php?page=instagram-portfolio
    • > Notice in wp-content/plugins/portfolio-by-lisa-westlund/inc/options-page-wrapper.php+37
    Undefined variable: wplw_instagram_userID
    • > GET request to /wp-admin/options-general.php?page=instagram-portfolio
    • > Notice in wp-content/plugins/portfolio-by-lisa-westlund/inc/options-page-wrapper.php+40
    Undefined variable: wplw_hashtag
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=instagram-portfolio
    • > Notice in wp-content/plugins/portfolio-by-lisa-westlund/inc/options-page-wrapper.php+51
    Trying to access array offset on value of type bool

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
Please fix the following items
  • 2× 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/portfolio-by-lisa-westlund/lisawestlund-instagram-portfolio.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/portfolio-by-lisa-westlund/inc/options-page-wrapper.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=instagram-portfolio
    • > Network (severe)
    wp-content/plugins/lisawestlund-instagram-portfolio/css/wplw_admin_style.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Donate link: Please fix this invalid URI: ""
  • Requires at least: The plugin version is formatted incorrectly
The official readme.txt might help

portfolio-by-lisa-westlund/lisawestlund-instagram-portfolio.php 92% from 13 tests

"Portfolio Plugin" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("portfolio-by-lisa-westlund.php" instead of "lisawestlund-instagram-portfolio.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,782 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
SVG2621,280
PHP28023223
CSS2458197
JavaScript1341282

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin