72% semalt-seo

Code Review | Semalt SEO

WordPress plugin Semalt SEO scored72%from 54 tests.

About plugin

  • Plugin page: semalt-seo
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.4
  • WordPress version: 6.3.1
  • First release: May 22, 2020
  • Latest release: Jun 22, 2020
  • Number of updates: 16
  • Update frequency: every 2.0 days
  • Top authors: semalt (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /1,449 total downloads

Benchmarks

Plugin footprint 83% 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.18MB] [CPU: ▲1.70ms] Passed 4 tests

Analyzing server-side resources used by Semalt SEO
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2052.00 ▲3.90
Dashboard /wp-admin3.53 ▲0.19329.39 ▲265.35
Posts /wp-admin/edit.php3.57 ▲0.2148.23 ▼1.12
Add New Post /wp-admin/post-new.php6.06 ▲0.1794.14 ▲3.30
Media Library /wp-admin/upload.php3.38 ▲0.1540.53 ▲0.71
Competitors /wp-admin/admin.php?page=competitors3.3732.49
Pagespeed Boost /wp-admin/admin.php?page=pagespeed-boost3.4435.58
Best Pages /wp-admin/admin.php?page=best-pages3.3732.37
Keywords on TOP /wp-admin/admin.php?page=semalt-seo3.3732.45

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 45 new files
Database: 1 new table, 7 new options
New tables
wp_semalt_seo_cdn
New WordPress options
semalt_option_cdn_auth_key
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Semalt SEO
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,020 ▲24914.66 ▲0.275.37 ▲3.5643.87 ▲4.30
Dashboard /wp-admin2,303 ▲1126.06 ▲1.17116.42 ▼9.88105.87 ▲62.60
Posts /wp-admin/edit.php2,145 ▲532.80 ▲0.8242.73 ▲5.8435.63 ▲3.50
Add New Post /wp-admin/post-new.php1,559 ▲4023.87 ▲0.77680.07 ▼51.2938.25 ▼20.41
Media Library /wp-admin/upload.php1,429 ▲415.23 ▲1.07105.35 ▼4.9184.30 ▲36.37
Competitors /wp-admin/admin.php?page=competitors1,6043.03371.0353.21
Pagespeed Boost /wp-admin/admin.php?page=pagespeed-boost9632.4529.4028.22
Best Pages /wp-admin/admin.php?page=best-pages1,7283.50210.0048.08
Keywords on TOP /wp-admin/admin.php?page=semalt-seo1,6353.00264.7345.38

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/semalt-seo/admin/pages/semalt-seo-settings.php
    • > /wp-content/plugins/semalt-seo/public/partials/semalt-seo-public-display.php
    • > /wp-content/plugins/semalt-seo/admin/partials/semalt-seo-header.php
    • > /wp-content/plugins/semalt-seo/admin/partials/semalt-seo-admin-display.php
    • > /wp-content/plugins/semalt-seo/admin/pages/semalt-seo-meta-generation.php
  • 12× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      require_once(SEMALT_SEO_PATHadmin/partials/semalt-seo-header.php): failed to open stream: No such file or directory in wp-content/plugins/semalt-seo/admin/pages/semalt-seo-best-pages.php on line 10
    • > PHP Warning
      require_once(SEMALT_SEO_PATHadmin/partials/semalt-seo-header.php): failed to open stream: No such file or directory in wp-content/plugins/semalt-seo/admin/pages/semalt-seo-keywords-on-top.php on line 22
    • > PHP Warning
      Use of undefined constant SEMALT_SEO_PATH - assumed 'SEMALT_SEO_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/semalt-seo/admin/pages/semalt-seo-best-pages.php on line 10
    • > PHP Warning
      Use of undefined constant SEMALT_SEO_PATH - assumed 'SEMALT_SEO_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/semalt-seo/admin/pages/semalt-seo-pagespeed-boost.php on line 3
    • > PHP Warning
      Use of undefined constant SEMALT_SEO_PATH - assumed 'SEMALT_SEO_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/semalt-seo/admin/pages/semalt-seo-competitors.php on line 22
    • > PHP Warning
      require_once(SEMALT_SEO_PATHincludes/class-semalt-seo-image-optimization.php): failed to open stream: No such file or directory in wp-content/plugins/semalt-seo/admin/pages/semalt-seo-pagespeed-boost.php on line 3
    • > PHP Warning
      Use of undefined constant SEMALT_SEO_PATH - assumed 'SEMALT_SEO_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/semalt-seo/admin/pages/semalt-seo-keywords-on-top.php on line 22
    • > PHP Fatal error
      require_once(): Failed opening required 'SEMALT_SEO_PATHadmin/partials/semalt-seo-header.php' (include_path='.:/usr/share/php') in wp-content/plugins/semalt-seo/admin/pages/semalt-seo-best-pages.php on line 10
    • > PHP Fatal error
      require_once(): Failed opening required 'SEMALT_SEO_PATHincludes/class-semalt-seo-image-optimization.php' (include_path='.:/usr/share/php') in wp-content/plugins/semalt-seo/admin/pages/semalt-seo-pagespeed-boost.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'SEMALT_SEO_PATHadmin/partials/semalt-seo-header.php' (include_path='.:/usr/share/php') in wp-content/plugins/semalt-seo/admin/pages/semalt-seo-competitors.php on line 22

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)
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=competitors
    • > Javascript (severe) in unknown
    /wp-content/plugins/semalt-seo/admin/js/semalt-seo-competitors.js?ver=1.0.4 350:56 Uncaught TypeError: Cannot read properties of null (reading 'result')

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: keywords, seo, optimize images, semalt, website analytics

semalt-seo/semalt-seo.php 92% from 13 tests

The primary PHP file in "Semalt SEO" version 1.0.4 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 325 characters long)

Code Analysis Passed 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
No dangerous file extensions were detected8,637 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript128233415,335
PHP214806081,827
CSS3147391,471
SVG1004

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity14.00
▷ Minimum class complexity1.00
▷ Maximum class complexity46.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods65
▷ Static methods913.85%
▷ Public methods6092.31%
▷ Protected methods00.00%
▷ Private methods57.69%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin