78% data-triplify

Code Review | Data-Triplify JSON

WordPress plugin Data-Triplify JSON scored78%from 54 tests.

About plugin

  • Plugin page: data-triplify
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Apr 2, 2015
  • Latest release: Feb 24, 2016
  • Number of updates: 8
  • Update frequency: every 41.9 days
  • Top authors: DouglasParanhos (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /710 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
Installer ran successfully

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

Analyzing server-side resources used by Data-Triplify JSON
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1741.39 ▲1.94
Dashboard /wp-admin3.35 ▲0.0553.67 ▲5.94
Posts /wp-admin/edit.php3.45 ▲0.0951.70 ▲4.57
Add New Post /wp-admin/post-new.php5.93 ▲0.0589.00 ▼1.67
Media Library /wp-admin/upload.php3.28 ▲0.0542.60 ▲6.85
Data-Triplify /wp-admin/options-general.php?page=data-triplify/triplify.php3.2764.70

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 205 new files
Database: 2 new tables, 6 new options
New tables
wp_triplify_prefixes
wp_triplify_configurations
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Data-Triplify JSON
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.57 ▼1.021.77 ▼0.3943.72 ▲0.40
Dashboard /wp-admin2,210 ▲225.86 ▲0.9798.33 ▼19.1439.58 ▼8.62
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0539.53 ▲3.8336.38 ▲3.34
Add New Post /wp-admin/post-new.php1,555 ▲2018.65 ▼4.58608.69 ▼72.5563.88 ▲8.45
Media Library /wp-admin/upload.php1,395 ▲104.19 ▲0.0396.97 ▼7.1641.34 ▼3.99
Data-Triplify /wp-admin/options-general.php?page=data-triplify/triplify.php1,0372.5134.0232.53

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=data-triplify/triplify.php
    • > Notice in wp-content/plugins/data-triplify/render.php+231
    Undefined variable: termo

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 148× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ARC2' not found in wp-content/plugins/data-triplify/triplify1/arc2/store/ARC2_StoreAskQueryHandler.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'ARC2' not found in wp-content/plugins/data-triplify/triplify1/arc2/serializers/ARC2_POSHRDFSerializer.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'ARC2' not found in wp-content/plugins/data-triplify/triplify1/arc2/extractors/ARC2_ErdfExtractor.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'ARC2' not found in wp-content/plugins/data-triplify/triplify1/arc2/ARC2_Graph.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'ARC2' not found in wp-content/plugins/data-triplify/arc2/extractors/ARC2_RdfaExtractor.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'ARC2' not found in wp-content/plugins/data-triplify/arc2/ARC2_Resource.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/data-triplify/triplify1/arc2/tests/ARC2_TestCase.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ARC2' not found in wp-content/plugins/data-triplify/triplify1/arc2/store/ARC2_StoreCBJSONLoader.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'ARC2' not found in wp-content/plugins/data-triplify/triplify1/arc2/store/ARC2_StoreInsertQueryHandler.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'ARC2' not found in wp-content/plugins/data-triplify/arc2/store/ARC2_MemStore.php:11

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3, #4, #5, #6 in data-triplify/assets to your readme.txt
You can look at the official readme.txt

data-triplify/triplify.php 92% from 13 tests

The primary PHP file in "Data-Triplify JSON" version 1.0.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("data-triplify.php" instead of "triplify.php")

Code Analysis 97% from 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 detected21,908 lines of code in 112 files:
LanguageFilesBlank linesComment linesLines of code
PHP992,8223,60319,771
XML48911,405
JavaScript3020450
Markdown3540175
JSON29090
Ant15017

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
These items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 108)
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity48.67
▷ Minimum class complexity1.00
▷ Maximum class complexity920.00
Average method complexity4.66
▷ Minimum method complexity1.00
▷ Maximum method complexity108.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes184
▷ Abstract classes00.00%
▷ Concrete classes184100.00%
▷ Final classes00.00%
Methods2,357
▷ Static methods1586.70%
▷ Public methods2,26195.93%
▷ Protected methods964.07%
▷ Private methods00.00%
Functions98
▷ Named functions6869.39%
▷ Anonymous functions3030.61%
Constants26
▷ Global constants415.38%
▷ Class constants2284.62%
▷ Public constants22100.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
No PNG images were found in this plugin