10% truth

Code Review | Truth

WordPress plugin Truth scored10%from 54 tests.

About plugin

  • Plugin page: truth
  • Plugin version: 2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.5
  • WordPress version: 6.3.1
  • First release: Jul 17, 2013
  • Latest release: Aug 12, 2020
  • Number of updates: 28
  • Update frequency: every 92.3 days
  • Top authors: UaMV (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

100+ active /6,733 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'Truth_Admin' does not have a method 'initialize_plugin'

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

A check of server-side resources used by Truth
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1542.32 ▼13.55
Dashboard /wp-admin3.45 ▲0.1455.50 ▲5.68
Posts /wp-admin/edit.php3.56 ▲0.2052.17 ▲2.51
Add New Post /wp-admin/post-new.php6.04 ▲0.1692.90 ▼5.63
Media Library /wp-admin/upload.php3.37 ▲0.1441.01 ▲6.43

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 8 new options
New WordPress options
truth_typewheel_notices
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
truth_activated
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Truth
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7713.41 ▼0.971.74 ▼0.1344.07 ▲0.27
Dashboard /wp-admin2,232 ▲444.88 ▼0.0097.32 ▼18.1440.73 ▼5.52
Posts /wp-admin/edit.php2,111 ▲222.06 ▲0.0639.92 ▲4.2338.23 ▲5.05
Add New Post /wp-admin/post-new.php1,539 ▲523.36 ▲0.17661.05 ▼27.3553.42 ▼1.51
Media Library /wp-admin/upload.php1,408 ▲174.22 ▲0.03101.22 ▼3.5344.16 ▲0.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • truth_typewheel_notices
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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 items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/truth/typewheel-notice/class-typewheel-notice.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/truth/truth.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/truth/typewheel-notice/class-typewheel-notice.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 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
8 plugin tags: youversion, passage, verse, christian, version...

truth/truth.php Passed 13 tests

The primary PHP file in "Truth" version 2.6 is used by WordPress to initiate all plugin functionality
60 characters long description:
Generates YouVersion links for Biblical scripture references

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin745 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP6285241682
JavaScript2253541
CSS22022

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity19.20
▷ Minimum class complexity3.00
▷ Maximum class complexity42.00
Average method complexity3.84
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods32
▷ Static methods412.50%
▷ Public methods2887.50%
▷ Protected methods00.00%
▷ Private methods412.50%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin