83% lti-seo

Code Review | LTI SEO

WordPress plugin LTI SEO scored83%from 54 tests.

About plugin

  • Plugin page: lti-seo
  • Plugin version: 0.6.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 13, 2015
  • Latest release: Dec 12, 2015
  • Number of updates: 10
  • Update frequency: every 21.4 days
  • Top authors: lti (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active /2,715 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.71MB] [CPU: ▼4.93ms] Passed 4 tests

An overview of server-side resources used by LTI SEO
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.28 ▲0.8256.51 ▲15.27
Dashboard /wp-admin4.02 ▲0.6758.92 ▼11.75
Posts /wp-admin/edit.php4.07 ▲0.7151.86 ▲0.76
Add New Post /wp-admin/post-new.php6.62 ▲0.73100.47 ▼13.96
Media Library /wp-admin/upload.php3.94 ▲0.7144.25 ▲5.24

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 122 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
lti_seo_options

Browser metrics Passed 4 tests

Checking browser requirements for LTI SEO
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5614.20 ▼0.521.84 ▲0.1741.86 ▲2.70
Dashboard /wp-admin2,216 ▲455.65 ▼0.04109.87 ▲20.1239.36 ▼2.41
Posts /wp-admin/edit.php2,124 ▲242.00 ▲0.0468.15 ▲30.2134.05 ▼1.11
Add New Post /wp-admin/post-new.php1,548 ▲2223.20 ▼0.50675.71 ▲14.2656.30 ▼0.52
Media Library /wp-admin/upload.php1,418 ▲184.12 ▼0.09123.41 ▲15.4242.53 ▼4.44

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

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
  • 26× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Lti\\Seo\\Generators\\GenericMetaTag' not found in wp-content/plugins/lti-seo/src/frontend/generators/twitter_cards.php:11
    • > PHP Warning
      require_once(wp-content/plugins/lti-seo/vendor/lti/google/src/Google/../autoload.php): failed to open stream: No such file or directory in wp-content/plugins/lti-seo/vendor/lti/google/src/Google/Collection.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'Lti\\Seo\\Generators\\GenericMetaTag' not found in wp-content/plugins/lti-seo/src/generators/open_graph.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Lti\\Seo\\Generators\\GenericMetaTag' not found in wp-content/plugins/lti-seo/src/generators/link_rel.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Lti\\Seo\\Generators\\GenericMetaTag' not found in wp-content/plugins/lti-seo/src/frontend/generators/keywords.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Lti\\Seo\\Generators\\GenericMetaTag' not found in wp-content/plugins/lti-seo/src/generators/keywords.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Lti\\Seo\\Generators\\Article' not found in wp-content/plugins/lti-seo/src/frontend/generators/schema_org.php:17
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/lti-seo/vendor/lti/google/src/Google/../autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/lti-seo/vendor/lti/google/src/Google/Collection.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'Lti\\Seo\\Helpers\\Wordpress_Helper' not found in wp-content/plugins/lti-seo/src/helpers/lti_seo_helper.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service_Webmasters' not found in wp-content/plugins/lti-seo/vendor/lti/google/src/Lti/webmaster.php:139

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 21 tag instead of maximum 10
  • Requires at least: Invalid version format
  • Screenshots: Screenshot #6 (Meta box in the post editing page.) image missing
You can take inspiration from this readme.txt

lti-seo/lti-seo.php Passed 13 tests

The entry point to "LTI SEO" version 0.6.0 is a PHP file that has certain tags in its header comment area
94 characters long description:
Search engine optimization made easy: make your content more visible in search engine results.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected10,651 lines of code in 99 files:
LanguageFilesBlank linesComment linesLines of code
PHP961,9224,30510,559
JSON10090
CSS1001
JavaScript1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity6.20
▷ Minimum class complexity1.00
▷ Maximum class complexity164.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces7
Interfaces8
Traits0
Classes233
▷ Abstract classes114.72%
▷ Concrete classes22295.28%
▷ Final classes00.00%
Methods829
▷ Static methods263.14%
▷ Public methods75290.71%
▷ Protected methods253.02%
▷ Private methods526.27%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants54
▷ Global constants59.26%
▷ Class constants4990.74%
▷ Public constants49100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected