10% bible-post

Code Review | Bible Post

WordPress plugin Bible Post scored 10% from 54 tests.

About plugin

  • Plugin page: bible-post
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.4.2
  • WordPress version: 5.8.1
  • First release: Jun 17, 2011
  • Latest release: Nov 19, 2012
  • Number of updates: 28
  • Update frequency: every 18.6 days
  • Top authors: Hyno (82.14%)antony_salas (21.43%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,435 total downloads

Benchmarks

Plugin footprint 40% 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
These installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/bible-post/biblepost.php+128
    Methods with the same name as their class will not be constructors in a future version of PHP; BiblePostWidget has a deprecated constructor

Server metrics [RAM: ▼1.74MB] [CPU: ▼186.46ms] Passed 4 tests

Analyzing server-side resources used by Bible Post
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.89 ▼0.945.69 ▼26.42
Dashboard /wp-admin1.91 ▼1.145.43 ▼42.62
Posts /wp-admin/edit.php1.91 ▼1.206.43 ▼32.54
Add New Post /wp-admin/post-new.php1.91 ▼3.525.15 ▼642.77
Media Library /wp-admin/upload.php1.91 ▼1.095.90 ▼27.92
Bible Post /wp-admin/options-general.php?page=bible-post/biblepost.php1.915.75

Server storage [IO: ▲0.57MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Please try to fix the following items
  • The plugin illegally modified 1 file (1.38KB) outside of "wp-content/plugins/bible-post/" and "wp-content/uploads/"
    • (new file) wp-content/themes/twentytwentyone/bible-post_template.php
Filesystem: 33 new files
Database: no new tables, 9 new options
New WordPress options
bp_hyno_id_page
bp_hyno_importar
bp_hyno_version
bp_hyno_conexion
widget_bp_hyno-widget
bp_hyno_estado
bp_hyno_mostrarversion
bp_hyno_footnotes
bp_hyno_estilo

Browser metrics Passed 4 tests

An overview of browser requirements for Bible Post
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲10216.30 ▲0.789.64 ▼0.7647.53 ▼4.21
Dashboard /wp-admin2,975 ▲415.97 ▼0.06133.20 ▼11.65112.94 ▲1.32
Posts /wp-admin/edit.php2,744 ▲52.72 ▲0.0162.89 ▼5.6086.88 ▲0.66
Add New Post /wp-admin/post-new.php1,618 ▼6521.36 ▲2.62252.16 ▼128.91102.72 ▼6.46
Media Library /wp-admin/upload.php1,812 ▲55.00 ▼0.01149.11 ▲1.42122.70 ▲9.86
Bible Post /wp-admin/options-general.php?page=bible-post/biblepost.php1,8872.2551.4685.04

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
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/bible-post/biblepost.php+128
    Methods with the same name as their class will not be constructors in a future version of PHP; BiblePostWidget has a deprecated constructor
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_bp_hyno-widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=bible-post/biblepost.php
    • > Deprecated in wp-content/plugins/bible-post/biblepost.php+128
    Methods with the same name as their class will not be constructors in a future version of PHP; BiblePostWidget has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=bible-post/biblepost.php
    • > User deprecated in wp-includes/functions.php+5304
    The called constructor method for WP_Widget in BiblePostWidget is deprecated since version 4.3.0! Use __construct() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=bible-post/biblepost.php
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

SRP 0% 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 items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/bible-post/script/biblepost_tinymce.php
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/bible-post/admin_page.php:2
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/bible-post/widget_form.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/bible-post/widget_form.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bible-post/biblepost.php:128
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/bible-post/widget_form.php on line 4
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/bible-post/widget_form.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/bible-post/widget_form.php on line 8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/bible-post/widget_form.php on line 2
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/bible-post/widget_form.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/bible-post/bible-post_template.php:5

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 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Pasaje Biblico publicado.), #2 (Widget con pasaje Biblico Favorito.), #3 (Interface en el para Insertar Pasaje Biblico.), #4 (Estilo en el Editor.), #5 (Panel de administracion.)
The official readme.txt is a good inspiration

bible-post/biblepost.php 85% from 13 tests

The main PHP file in "Bible Post" ver. 2.2 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("bible-post.php" instead of "biblepost.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 266 characters long)

Code Analysis Passed 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
Success! There were no dangerous files found in this plugin2,230 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP82691801,762
PO File2108112259
JavaScript61515165
CSS11344

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity62.25
▷ Minimum class complexity6.00
▷ Maximum class complexity119.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity56.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods89
▷ Static methods00.00%
▷ Public methods7483.15%
▷ Protected methods1516.85%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants17100.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
6 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/paypal_200x96.png27.59KB7.41KB▼ 73.13%
img/hyno-bible_2.png1.43KB0.88KB▼ 38.31%
img/hyno-learn-more-opened.png1.16KB1.15KB▼ 1.43%
img/hyno-learn-more-bg.png0.14KB0.11KB▼ 15.83%
script/icon_bible.png0.87KB1.01KB0.00%