73% woo-seo-addon

Code Review | Premmerce SEO for WooCommerce

WordPress plugin Premmerce SEO for WooCommerce scored 73% from 54 tests.

About plugin

  • Plugin page: woo-seo-addon
  • Plugin version: 2.1.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 31, 2017
  • Latest release: Aug 11, 2023
  • Number of updates: 41
  • Update frequency: every 53.0 days
  • Top authors: premmerce (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

3,000+ active / 80,734 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.64MB] [CPU: ▲2.98ms] Passed 4 tests

A check of server-side resources used by Premmerce SEO for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.09 ▲0.6344.54 ▲2.54
Dashboard /wp-admin3.97 ▲0.6750.64 ▲1.99
Posts /wp-admin/edit.php4.02 ▲0.6753.89 ▲7.01
Add New Post /wp-admin/post-new.php6.49 ▲0.6097.86 ▲2.35
Media Library /wp-admin/upload.php3.89 ▲0.6739.67 ▲5.04
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius4.1038.14

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 240 new files
Database: no new tables, 14 new options
New WordPress options
can_compress_scripts
widget_recent-posts
premmerce_seo_settings_markup_og
premmerce_seo_db_version
fs_accounts
db_upgraded
premmerce_seo_settings_image_alts
premmerce_seo_settings_markup_ld
premmerce_seo_settings_markup_tc
widget_recent-comments
...

Browser metrics Passed 4 tests

An overview of browser requirements for Premmerce SEO for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲14213.30 ▼0.921.85 ▼0.1433.75 ▼11.90
Dashboard /wp-admin2,251 ▲625.84 ▲0.88104.40 ▼19.8044.05 ▼3.60
Posts /wp-admin/edit.php2,140 ▲512.07 ▲0.0240.92 ▲4.3838.05 ▲6.39
Add New Post /wp-admin/post-new.php1,541 ▲818.37 ▼4.85581.76 ▼78.4654.60 ▼13.24
Media Library /wp-admin/upload.php1,442 ▲544.24 ▲0.0694.86 ▼33.0742.48 ▼0.76
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0841.7226.4224.28

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/woo-seo-addon/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 10 options in the database
    • widget_recent-posts
    • fs_debug_mode
    • widget_recent-comments
    • fs_active_plugins
    • db_upgraded
    • fs_accounts
    • widget_theysaidso_widget
    • premmerce_seo_db_version
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 23× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Premmerce\\SeoAddon\\Core\\MetaEngines\\MetaEngineInterface' not found in wp-content/plugins/woo-seo-addon/src/Core/MetaEngines/MetaDataEngine.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Premmerce\\SeoAddon\\Core\\MetaStorage\\Strategy\\Base\\AbstractArchiveStrategy' not found in wp-content/plugins/woo-seo-addon/src/Core/MetaStorage/Strategy/TermArchiveStrategy.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Premmerce\\SeoAddon\\Core\\Config\\SettingsInterface' not found in wp-content/plugins/woo-seo-addon/src/Admin/Pages/Metadata.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Premmerce\\SeoAddon\\Core\\MetaStorage\\Strategy\\Base\\AbstractArchiveStrategy' not found in wp-content/plugins/woo-seo-addon/src/Core/MetaStorage/Strategy/PostTypeArchiveStrategy.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Premmerce\\SeoAddon\\Core\\MetaStorage\\Strategy\\Base\\AbstractArchiveStrategy' not found in wp-content/plugins/woo-seo-addon/src/Core/MetaStorage/Strategy/AuthorArchiveStrategy.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Premmerce\\SeoAddon\\Core\\MetaStorage\\Strategy\\SingleStrategy' not found in wp-content/plugins/woo-seo-addon/src/Core/MetaStorage/Strategy/MainSingleStrategy.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Premmerce\\SeoAddon\\Core\\MetaStorage\\Strategy\\Base\\AbstractArchiveStrategy' not found in wp-content/plugins/woo-seo-addon/src/Core/MetaStorage/Strategy/SearchArchiveStrategy.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Premmerce\\SeoAddon\\Core\\MetaStorage\\Strategy\\Base\\AbstractStrategy' not found in wp-content/plugins/woo-seo-addon/src/Core/MetaStorage/Strategy/Base/AbstractArchiveStrategy.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'Premmerce\\SeoAddon\\Core\\MetaEngines\\MetaEngineInterface' not found in wp-content/plugins/woo-seo-addon/src/Core/MetaEngines/TwitterCard.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Premmerce\\SeoAddon\\Core\\MetaStorage\\Strategy\\Base\\AbstractArchiveStrategy' not found in wp-content/plugins/woo-seo-addon/src/Core/MetaStorage/Strategy/MainArchiveStrategy.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: twitter cards, schemaorg, yoast, opengraph, woocommerce seo

woo-seo-addon/premmerce-seo-addon.php 85% from 13 tests

"Premmerce SEO for WooCommerce" version 2.1.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-seo-addon.php" instead of "premmerce-seo-addon.php")
  • Requires at least: Required version must match the one declared in readme.txt ("4.8" instead of "3.0")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin36,126 lines of code in 191 files:
LanguageFilesBlank linesComment linesLines of code
PHP1698,55918,47635,316
Markdown21210284
PO File2120173259
JavaScript33459194
JSON20060
CSS130013

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
These items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity51.99
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.19
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces17
Interfaces4
Traits1
Classes86
▷ Abstract classes44.65%
▷ Concrete classes8295.35%
▷ Final classes00.00%
Methods1,513
▷ Static methods22314.74%
▷ Public methods1,11273.50%
▷ Protected methods211.39%
▷ Private methods38025.12%
Functions109
▷ Named functions10091.74%
▷ Anonymous functions98.26%
Constants151
▷ Global constants9864.90%
▷ Class constants5335.10%
▷ Public constants53100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%