67% premium-seo-pack

Code Review | Premium SEO Pack - WP SEO Plugin

WordPress plugin Premium SEO Pack - WP SEO Plugin scored67%from 54 tests.

About plugin

  • Plugin page: premium-seo-pack
  • Plugin version: 1.5.000
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.2
  • WordPress version: 6.3.1
  • First release: May 16, 2017
  • Latest release: May 4, 2023
  • Number of updates: 52
  • Update frequency: every 41.9 days
  • Top authors: cifi (75%)calinvingan (26.92%)

Code review

54 tests

User reviews

16 reviews

Install metrics

10,000+ active /174,814 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.52MB] [CPU: ▼0.83ms] Passed 4 tests

This is a short check of server-side resources used by Premium SEO Pack - WP SEO Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.72 ▲1.2658.10 ▲14.40
Dashboard /wp-admin3.86 ▲0.5256.41 ▼6.24
Posts /wp-admin/edit.php3.91 ▲0.5650.11 ▲4.96
Add New Post /wp-admin/post-new.php6.39 ▲0.5096.35 ▼10.24
Media Library /wp-admin/upload.php3.72 ▲0.4943.31 ▲8.18

Server storage [IO: ▲2.25MB] [DB: ▲0.01MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Checking browser requirements for Premium SEO Pack - WP SEO Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,240 ▲46915.26 ▲0.9832.93 ▲30.9037.31 ▼6.19
Dashboard /wp-admin2,226 ▲415.89 ▲0.03112.98 ▲3.6143.85 ▲2.35
Posts /wp-admin/edit.php2,115 ▲232.03 ▼0.0235.28 ▼4.6733.71 ▼4.30
Add New Post /wp-admin/post-new.php6,921 ▲5,37918.87 ▲0.45904.66 ▲292.1236.39 ▼18.52
Media Library /wp-admin/upload.php1,417 ▲294.11 ▼0.1296.65 ▼11.0444.05 ▼0.24

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/premium-seo-pack/config/config.php+6
    Constant PSP_REQUEST_TIME already defined
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/premium-seo-pack/view/Notices.php
  • 35× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PSP_Models_Abstract_Seo' not found in wp-content/plugins/premium-seo-pack/models/services/Sitemap.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/premium-seo-pack/view/Login.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'PSP_Models_Abstract_Seo' not found in wp-content/plugins/premium-seo-pack/models/services/Noindex.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PSP_Models_Abstract_Seo' not found in wp-content/plugins/premium-seo-pack/models/services/Publisher.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PSP_Classes_Tools' not found in wp-content/plugins/premium-seo-pack/view/Settings.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'PSP_Classes_FrontController' not found in wp-content/plugins/premium-seo-pack/controllers/Login.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PSP_Classes_FrontController' not found in wp-content/plugins/premium-seo-pack/classes/Action.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'PSP_Classes_FrontController' not found in wp-content/plugins/premium-seo-pack/classes/Tools.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PSP_Models_Abstract_Seo' not found in wp-content/plugins/premium-seo-pack/models/services/Canonical.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PSP_Classes_FrontController' not found in wp-content/plugins/premium-seo-pack/controllers/Frontend.php:3

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 90% 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
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (SEO Pack comes with predefined patterns), #2 (Customize each page for Wordpress SEO), #3 (Customize each page for Open Graph), #4 (Customize each page for Twitter Card), #5 (You can choose to Show/Hide a page), #6 (Choose which functions you need), #7 (Customize the patterns for each Post Type in Premium SEO Pack)
The official readme.txt might help

premium-seo-pack/index.php 85% from 13 tests

The principal PHP file in "Premium SEO Pack - WP SEO Plugin" v. 1.5.000 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("premium-seo-pack.php" instead of "index.php")
  • Description: The description should be shorter than 140 characters (currently 174 characters long)

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 plugin20,695 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
CSS121,34610713,069
PHP421,2029506,343
JavaScript92442401,227
JSON10044
SVG10012

PHP code Passed 2 tests

A short review 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.67
Average class complexity36.00
▷ Minimum class complexity1.00
▷ Maximum class complexity157.00
Average method complexity5.36
▷ Minimum method complexity1.00
▷ Maximum method complexity74.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes34
▷ Abstract classes25.88%
▷ Concrete classes3294.12%
▷ Final classes00.00%
Methods273
▷ Static methods3211.72%
▷ Public methods24991.21%
▷ Protected methods124.40%
▷ Private methods124.40%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants26
▷ Global constants26100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
13 PNG files occupy 1.04MB with 0.44MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png109.19KB33.36KB▼ 69.45%
view/img/settings/squirrly.png8.77KB9.11KB0.00%
view/img/settings/logo.png21.12KB21.55KB0.00%
screenshot-3.png131.47KB35.93KB▼ 72.67%
screenshot-7.png126.66KB36.46KB▼ 71.22%