57% integrity-checker

Code Review | Integrity Checker

WordPress plugin Integrity Checker scored57%from 54 tests.

About plugin

  • Plugin page: integrity-checker
  • Plugin version: 0.10.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.7.4
  • WordPress version: 6.3.1
  • First release: Jan 2, 2017
  • Latest release: May 1, 2017
  • Number of updates: 5
  • Update frequency: every 23.0 days
  • Top authors: eriktorsner (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

400+ active /8,385 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.19MB] [CPU: ▼15.49ms] Passed 4 tests

This is a short check of server-side resources used by Integrity Checker
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.96 ▲0.5042.86 ▼3.99
Dashboard /wp-admin3.80 ▲0.5050.79 ▲2.25
Posts /wp-admin/edit.php3.86 ▲0.5049.30 ▲3.20
Add New Post /wp-admin/post-new.php3.64 ▼2.2537.31 ▼58.79
Media Library /wp-admin/upload.php3.73 ▲0.5036.09 ▼1.41
Integrity Checker /wp-admin/tools.php?page=integrity-checker_options3.66345.36

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 107 new files
Database: 1 new table, 9 new options
New tables
wp_integrity_checker_files
New WordPress options
widget_recent-comments
widget_recent-posts
recovery_mode_email_last_sent
can_compress_scripts
integrity-checker_version
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
integrity-checker_dbversion

Browser metrics Passed 4 tests

An overview of browser requirements for Integrity Checker
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.80 ▲0.501.81 ▲0.1743.67 ▲5.19
Dashboard /wp-admin2,210 ▲224.84 ▼1.04108.88 ▲3.0844.01 ▲0.58
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0335.18 ▼1.6032.24 ▼1.00
Add New Post /wp-admin/post-new.php1,536 ▲323.30 ▼0.02649.84 ▼33.2952.93 ▲1.91
Media Library /wp-admin/upload.php1,392 ▲74.37 ▲0.1697.81 ▼8.1541.89 ▼4.54
Integrity Checker /wp-admin/tools.php?page=integrity-checker_options550.440.148.57

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_integrity_checker_files
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • recovery_mode_email_last_sent
    • widget_recent-comments
    • theysaidso_admin_options
    • integrity-checker_version
    • integrity-checker_dbversion
    • db_upgraded

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/tools.php?page=integrity-checker_options
    • > Error in wp-content/plugins/integrity-checker/src/ApiClient.php+345
    Uncaught Error: Cannot use object of type WP_Error as array in wp-content/plugins/integrity-checker/src/ApiClient.php:345
    Stack trace:
    #0 wp-content/plugins/integrity-checker/src/ApiClient.php(59): integrityChecker\ApiClient->getApiKey()
    #1 wp-content/plugins/integrity-checker/src/Settings.php(319): integrityChecker\ApiClient->getQuota()
    #2 wp-content/plugins/integrity-checker/src/Admin/AdminPage.php(118): integrityChecker\Settings->userLevel()
    #3 wp-includes/class-wp-hook.php(310): integrityChecker\Admin\AdminPage->enqueueAdminScripts()
    #4 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #5 wp-includes/plugin.php(517): WP_Hook->do_action()
    #6 wp-admin/admin-header.php(118): do_action()
    #7 wp-admin/admin.php(239): require_once('/var/www/wordpr...')
    #8 wp-admin/tools.php(40): require_once('/var/www/wordpr...')
    #

SRP 0% 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
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/integrity-checker/src/Admin/views/terms.php
  • 44× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'integrityChecker\\Diagnostic' not found in wp-content/plugins/integrity-checker/src/Admin/views/About.php:4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/integrity-checker/src/Admin/views/Upgrade.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/integrity-checker/src/Admin/views/FilesScanResults.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'integrityChecker\\Cron\\AbstractField' not found in wp-content/plugins/integrity-checker/src/Cron/HoursField.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/integrity-checker/src/Admin/views/Files/ownerandpermissions.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/integrity-checker/src/Admin/views/Settings/schedule.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'integrityChecker\\Tests\\BaseTest' not found in wp-content/plugins/integrity-checker/src/Tests/Settings.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/integrity-checker/src/Admin/views/PluginUpdateAlert.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'integrityChecker\\Cron\\AbstractField' not found in wp-content/plugins/integrity-checker/src/Cron/MinutesField.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'integrityChecker\\Pimple\\ServiceProviderInterface' not found in wp-content/plugins/integrity-checker/src/RuntimeProvider.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/tools.php?page=integrity-checker_options
    • > Network (severe)
    wp-admin/tools.php?page=integrity-checker_options - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: security plugin, wordpress security, permissions, secure, checksum...

integrity-checker/integrity-checker.php 92% from 13 tests

The main PHP file in "Integrity Checker" ver. 0.10.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

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
Good job! No executable or dangerous file extensions detected10,994 lines of code in 89 files:
LanguageFilesBlank linesComment linesLines of code
PHP751,3182,7156,343
SVG1002,671
JavaScript71842281,673
CSS44914295
JSON20012

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity14.02
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces8
Interfaces2
Traits0
Classes52
▷ Abstract classes23.85%
▷ Concrete classes5096.15%
▷ Final classes00.00%
Methods333
▷ Static methods61.80%
▷ Public methods26178.38%
▷ Protected methods51.50%
▷ Private methods6720.12%
Functions32
▷ Named functions39.38%
▷ Anonymous functions2990.62%
Constants29
▷ Global constants26.90%
▷ Class constants2793.10%
▷ Public constants27100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/sort_both.png0.20KB0.29KB0.00%
images/sort_asc_disabled.png0.14KB0.25KB0.00%
images/sort_desc_disabled.png0.14KB0.25KB0.00%
images/sort_desc.png0.15KB0.25KB0.00%
images/icon-256x256.png10.38KB11.15KB0.00%