10% poolparty-thesaurus

Code Review | PoolParty Thesaurus

WordPress plugin PoolParty Thesaurus scored10%from 54 tests.

About plugin

  • Plugin page: poolparty-thesaurus
  • Plugin version: 2.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.1
  • WordPress version: 6.3.1
  • First release: May 3, 2010
  • Latest release: Mar 18, 2019
  • Number of updates: 46
  • Update frequency: every 70.5 days
  • Top authors: kurt-moser (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /4,089 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/poolparty-thesaurus/classes/PPThesaurus.class.php+175
    Non-static method PPThesaurus::installARC2() should not be called statically

Server metrics [RAM: ▲0.94MB] [CPU: ▼1.48ms] Passed 4 tests

An overview of server-side resources used by PoolParty Thesaurus
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.60 ▲2.1358.54 ▲13.20
Dashboard /wp-admin4.36 ▲1.0567.69 ▲16.94
Posts /wp-admin/edit.php4.40 ▲1.0464.10 ▲7.90
Add New Post /wp-admin/post-new.php6.57 ▲0.6868.89 ▼41.08
Media Library /wp-admin/upload.php4.22 ▲0.9952.17 ▲14.06
PoolParty Thesaurus /wp-admin/options-general.php?page=pp-thesaurus5.3356.67

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 351 new files
Database: no new tables, 9 new options
New WordPress options
PPThesaurus
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
recovery_mode_email_last_sent
can_compress_scripts
widget_pp_thesaurus_sidebar_search
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for PoolParty Thesaurus
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,782 ▲2113.45 ▼0.489.89 ▲8.1722.29 ▼20.01
Dashboard /wp-admin2,202 ▲255.62 ▼0.0493.93 ▲4.8847.16 ▲2.89
Posts /wp-admin/edit.php2,107 ▲71.94 ▼0.0137.54 ▼5.4536.85 ▼1.97
Add New Post /wp-admin/post-new.php45 ▼1,4830.42 ▼22.550.08 ▼691.1611.47 ▼43.74
Media Library /wp-admin/upload.php1,401 ▲14.27 ▲0.04107.83 ▲0.0068.59 ▲21.57
PoolParty Thesaurus /wp-admin/options-general.php?page=pp-thesaurus7081.127.9424.84

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/poolparty-thesaurus/uninstall.php+8
    Constant PP_THESAURUS_PLUGIN_DIR already defined
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_pp_thesaurus_sidebar_search
    • recovery_mode_email_last_sent
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=pp-thesaurus
    • > Error in wp-content/plugins/poolparty-thesaurus/arc/store/ARC2_Store.php+771
    Uncaught Error: Call to a member function escape() on null in wp-content/plugins/poolparty-thesaurus/arc/store/ARC2_Store.php:771
    Stack trace:
    #0 wp-content/plugins/poolparty-thesaurus/arc/store/ARC2_StoreQueryHandler.php(39): ARC2_Store->getTermID()
    #1 wp-content/plugins/poolparty-thesaurus/arc/store/ARC2_StoreSelectQueryHandler.php(1099): ARC2_StoreQueryHandler->getTermID()
    #2 wp-content/plugins/poolparty-thesaurus/arc/store/ARC2_StoreSelectQueryHandler.php(1071): ARC2_StoreSelectQueryHandler->getTriplePatternSQL()
    #3 wp-content/plugins/poolparty-thesaurus/arc/store/ARC2_StoreSelectQueryHandler.php(1081): ARC2_StoreSelectQueryHandler->getPatternSQL()
    #4 wp-content/plugins/poolparty-thesaurus/arc/store/ARC2_StoreSelectQueryHandler.php(1072): ARC2_StoreSelectQueryHandler->getDefaultPatternSQL()
    #5 wp-content/plugins/poolparty-thesaurus/arc/store/ARC2_StoreSelectQueryHandler.php(

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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/poolparty-thesaurus/pp-thesaurus.php
  • 102× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ARC2' not found in wp-content/plugins/poolparty-thesaurus/arc/store/ARC2_StoreSPOGLoader.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Tests\\ARC2_TestCase' not found in wp-content/plugins/poolparty-thesaurus/arc/tests/unit/ARC2_getFormatTest.php:9
    • > PHP Warning
      require_once(wp-content/plugins/poolparty-thesaurus/arc/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/poolparty-thesaurus/arc/tests/bootstrap.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'ARC2' not found in wp-content/plugins/poolparty-thesaurus/arc/tests/ARC2_TestHandler.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'ARC2' not found in wp-content/plugins/poolparty-thesaurus/arc/parsers/ARC2_TurtleParser.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'ARC2' not found in wp-content/plugins/poolparty-thesaurus/arc/serializers/ARC2_RDFJSONSerializer.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ARC2' not found in wp-content/plugins/poolparty-thesaurus/arc/parsers/ARC2_CBJSONParser.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'ARC2' not found in wp-content/plugins/poolparty-thesaurus/arc/serializers/ARC2_TurtleSerializer.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'ARC2' not found in wp-content/plugins/poolparty-thesaurus/arc/extractors/ARC2_MicroformatsExtractor.php:11
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/poolparty-thesaurus/arc/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/poolparty-thesaurus/arc/tests/bootstrap.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 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
5 plugin tags: rdf, thesaurus, glossary, poolparty, skos

poolparty-thesaurus/pp-thesaurus.php 77% from 13 tests

The primary PHP file in "PoolParty Thesaurus" version 2.8 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("poolparty-thesaurus.php" instead of "pp-thesaurus.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 197 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected26,996 lines of code in 253 files:
LanguageFilesBlank linesComment linesLines of code
PHP1163,6673,80422,791
XML258461,895
JavaScript45524622
YAML119710447
PO File2120136375
Ruby812822353
Markdown4830180
CSS33112146
JSON290132
Ant15017
Dockerfile18515
make13013
INI12218
SQL1002

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.46
Average class complexity38.27
▷ Minimum class complexity1.00
▷ Maximum class complexity476.00
Average method complexity3.78
▷ Minimum method complexity1.00
▷ Maximum method complexity73.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes109
▷ Abstract classes32.75%
▷ Concrete classes10697.25%
▷ Final classes00.00%
Methods1,480
▷ Static methods664.46%
▷ Public methods1,36792.36%
▷ Protected methods1117.50%
▷ Private methods20.14%
Functions17
▷ Named functions952.94%
▷ Anonymous functions847.06%
Constants50
▷ Global constants3978.00%
▷ Class constants1122.00%
▷ Public constants11100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/thesaurus.png50.73KB0.12KB▼ 99.77%
js/unitip/TipPoint.png1.11KB0.60KB▼ 45.56%
js/unitip/TipCap.png0.65KB0.41KB▼ 36.73%
js/unitip/TipMid.png0.17KB0.11KB▼ 31.58%