84% linkpizza-manager

Code Review | linkPizza-Manager

WordPress plugin linkPizza-Manager scored84%from 54 tests.

About plugin

  • Plugin page: linkpizza-manager
  • Plugin version: 5.5.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.0
  • WordPress version: 6.3.1
  • First release: Oct 20, 2015
  • Latest release: Sep 29, 2022
  • Number of updates: 216
  • Update frequency: every 11.8 days
  • Top authors: Arjan Pronk (97.22%)gvenk (2.31%)kizitos (1.39%)

Code review

54 tests

User reviews

2 reviews

Install metrics

900+ active /19,578 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▼7.61ms] Passed 4 tests

Analyzing server-side resources used by linkPizza-Manager
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1036.40 ▼6.61
Dashboard /wp-admin3.41 ▲0.0745.45 ▼13.51
Posts /wp-admin/edit.php3.53 ▲0.1747.62 ▲0.48
Add New Post /wp-admin/post-new.php6.00 ▲0.1191.74 ▼10.78
Media Library /wp-admin/upload.php3.34 ▲0.1134.03 ▲0.54

Server storage [IO: ▲1.39MB] [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: 52 new files
Database: no new tables, 18 new options
New WordPress options
widget_theysaidso_widget
pzz_link_summary_position
pzz_link_summary_border_padding
widget_linkpizza_manager_widget
pzz_version
pzz_link_summary_link_color
pzz_link_summary_layout_type
theysaidso_admin_options
pzz_oidc_refresh_token
pzz_oidc_access_token
...

Browser metrics Passed 4 tests

An overview of browser requirements for linkPizza-Manager
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲15214.00 ▼0.612.34 ▲0.4035.25 ▼8.31
Dashboard /wp-admin2,273 ▲855.47 ▼0.44108.37 ▲1.3866.18 ▲27.84
Posts /wp-admin/edit.php2,194 ▲1052.48 ▲0.5039.92 ▼1.2736.64 ▲0.56
Add New Post /wp-admin/post-new.php6,295 ▲4,76219.43 ▼3.65844.92 ▲245.1037.40 ▼14.59
Media Library /wp-admin/upload.php1,449 ▲614.62 ▲0.33102.08 ▲1.1285.40 ▲41.75

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 18 options in the database
    • pzz_version
    • pzz_link_summary_border_padding
    • pzz_oidc_access_token
    • pzz_link_summary_border_color
    • widget_linkpizza_manager_managed_widget
    • db_upgraded
    • pzz_link_summary_border_width
    • theysaidso_admin_options
    • widget_recent-comments
    • pzz_link_summary_position
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'OAuth2\\GrantType\\IGrantType' not found in wp-content/plugins/linkpizza-manager/includes/OAuth2/GrantType/AuthorizationCode.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'OAuth2\\GrantType\\IGrantType' not found in wp-content/plugins/linkpizza-manager/includes/OAuth2/GrantType/Password.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/linkpizza-manager/widget/class-linkPizza-Manager-managed-widget.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/linkpizza-manager/widget/class-linkPizza-Manager-mediakit-widget.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'OAuth2\\GrantType\\IGrantType' not found in wp-content/plugins/linkpizza-manager/includes/OAuth2/GrantType/ClientCredentials.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/linkpizza-manager/widget/class-linkPizza-Manager-widget.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'OAuth2\\GrantType\\IGrantType' not found in wp-content/plugins/linkpizza-manager/includes/OAuth2/GrantType/RefreshToken.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 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
5 plugin tags: automated affiliate links, monetization, linkpizza, affiliate links, affiliate

linkpizza-manager/linkPizza-Manager.php 92% from 13 tests

The entry point to "linkPizza-Manager" version 5.5.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("linkpizza-manager.php" instead of "linkPizza-Manager.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin2,730 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP243771,3212,357
CSS3281207
JavaScript42110138
SVG20228

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity13.45
▷ Minimum class complexity1.00
▷ Maximum class complexity104.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces2
Interfaces1
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods128
▷ Static methods53.91%
▷ Public methods11791.41%
▷ Protected methods00.00%
▷ Private methods118.59%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants46
▷ Global constants1430.43%
▷ Class constants3269.57%
▷ Public constants32100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
14 PNG files occupy 1.22MB with 0.41MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/dollar-sign.png5.69KB6.33KB0.00%
shortcode/js/Icon-grey.png0.70KB0.65KB▼ 7.01%
assets/banner-772x250.png28.83KB12.67KB▼ 56.06%
assets/screenshot-3.png271.20KB74.11KB▼ 72.67%
admin/assets/Icon-orange.png1.38KB0.94KB▼ 31.77%