78% similar-posts-ontology

Code Review | Similar Posts Ontology

WordPress plugin Similar Posts Ontology scored78%from 54 tests.

About plugin

  • Plugin page: similar-posts-ont...
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 11, 2015
  • Latest release: Aug 3, 2023
  • Number of updates: 24
  • Update frequency: every 130.3 days
  • Top authors: cfischer83 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /2,256 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.24ms] Passed 4 tests

Server-side resources used by Similar Posts Ontology
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.27 ▼1.55
Dashboard /wp-admin3.36 ▲0.0646.04 ▼3.71
Posts /wp-admin/edit.php3.41 ▲0.0651.41 ▲2.72
Add New Post /wp-admin/post-new.php5.94 ▲0.0688.27 ▼5.64
Media Library /wp-admin/upload.php3.29 ▲0.0635.71 ▲1.93

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_similar_posts_ontology_widget

Browser metrics Passed 4 tests

Checking browser requirements for Similar Posts Ontology
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.22 ▼0.901.73 ▼0.3943.03 ▼4.88
Dashboard /wp-admin2,203 ▲154.88 ▼0.97111.72 ▼17.1538.10 ▼7.96
Posts /wp-admin/edit.php2,089 ▲212.05 ▲0.0640.87 ▲4.5138.10 ▲6.10
Add New Post /wp-admin/post-new.php1,539 ▲623.19 ▼0.08669.18 ▲2.3850.82 ▼1.52
Media Library /wp-admin/upload.php1,391 ▲64.18 ▲0.0297.36 ▼37.0542.52 ▼3.37

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_similar_posts_ontology_widget
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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 fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/similar-posts-ontology/similar-posts-ontology.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/similar-posts-ontology/Similar_Posts_Ontology_Widget.php:2

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

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: category, related, posts, taxonomy, articles...

similar-posts-ontology/similar-posts-ontology.php 85% from 13 tests

This is the main PHP file of "Similar Posts Ontology" version 2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 315 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected225 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24587222
CSS1003

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity6.83
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin