84% lh-rdf

Code Review | LH RDF

WordPress plugin LH RDF scored84%from 54 tests.

About plugin

  • Plugin page: lh-rdf
  • Plugin version: 1.21
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3
  • WordPress version: 6.3.1
  • First release: Sep 14, 2011
  • Latest release: Aug 21, 2015
  • Number of updates: 76
  • Update frequency: every 18.9 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /3,228 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.15MB] [CPU: ▼13.62ms] Passed 4 tests

This is a short check of server-side resources used by LH RDF
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▼0.6119.24 ▼18.94
Dashboard /wp-admin3.33 ▼0.0244.67 ▼14.09
Posts /wp-admin/edit.php3.38 ▲0.0244.00 ▼7.38
Add New Post /wp-admin/post-new.php5.91 ▲0.0277.51 ▼14.08
Media Library /wp-admin/upload.php3.25 ▲0.0237.23 ▲2.05
LH Rdf Mappings /wp-admin/options-general.php?page=lh-rdf/library/relationships.php3.1928.68

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

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

Browser metrics Passed 4 tests

Checking browser requirements for LH RDF
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6314.72 ▲0.011.67 ▲0.0138.16 ▼1.39
Dashboard /wp-admin2,202 ▲225.63 ▲0.0282.42 ▼4.1739.17 ▼2.66
Posts /wp-admin/edit.php2,101 ▲11.99 ▲0.0035.50 ▼5.3035.11 ▼4.88
Add New Post /wp-admin/post-new.php1,531 ▲523.19 ▼0.37644.45 ▲39.9958.49 ▲4.81
Media Library /wp-admin/upload.php1,404 ▲14.20 ▼0.0094.25 ▲0.6539.90 ▼5.91
LH Rdf Mappings /wp-admin/options-general.php?page=lh-rdf/library/relationships.php6721.126.3418.95

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 37× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'EasyRdf_Literal' not found in wp-content/plugins/lh-rdf/library/EasyRdf/Literal/XML.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'EasyRdf_Literal' not found in wp-content/plugins/lh-rdf/library/EasyRdf/Literal/Boolean.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'EasyRdf_Parser' not found in wp-content/plugins/lh-rdf/library/EasyRdf/Parser/JsonLdImplementation.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'EasyRdf_Serialiser_RdfPhp' not found in wp-content/plugins/lh-rdf/library/EasyRdf/Serialiser/Json.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'EasyRdf_Literal' not found in wp-content/plugins/lh-rdf/library/EasyRdf/Literal/Integer.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lh-rdf/lh-rdf.php:498
    • > PHP Fatal error
      Uncaught Error: Class 'EasyRdf_Parser' not found in wp-content/plugins/lh-rdf/library/EasyRdf/Parser/RdfPhp.php:48
    • > PHP Fatal error
      Uncaught Error: Class 'EasyRdf_Parser_RdfPhp' not found in wp-content/plugins/lh-rdf/library/EasyRdf/Parser/Arc.php:45
    • > PHP Fatal error
      Uncaught Error: Class 'EasyRdf_Literal' not found in wp-content/plugins/lh-rdf/library/EasyRdf/Literal/Date.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'EasyRdf_Resource' not found in wp-content/plugins/lh-rdf/library/EasyRdf/Collection.php:50

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: feeds, localhero, semantic web, rdf, feed...

lh-rdf/lh-rdf.php Passed 13 tests

The principal PHP file in "LH RDF" v. 1.21 is loaded by WordPress automatically on each request
42 characters long description:
Adds a semantic/SIOC RDF feed to Wordpress

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin12,031 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
PHP562,5047,41612,031

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
The following items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 109)
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity43.72
▷ Minimum class complexity1.00
▷ Maximum class complexity923.00
Average method complexity4.96
▷ Minimum method complexity1.00
▷ Maximum method complexity109.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes58
▷ Abstract classes00.00%
▷ Concrete classes58100.00%
▷ Final classes00.00%
Methods618
▷ Static methods9615.53%
▷ Public methods43269.90%
▷ Protected methods16827.18%
▷ Private methods182.91%
Functions27
▷ Named functions2281.48%
▷ Anonymous functions518.52%
Constants21
▷ Global constants00.00%
▷ Class constants21100.00%
▷ Public constants21100.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
There are no PNG files in this plugin