83% islamic-books

Code Review | Islamic Books by EDC

WordPress plugin Islamic Books by EDC scored 83% from 54 tests.

About plugin

  • Plugin page: islamic-books
  • Plugin version: 2.11
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 30, 2014
  • Latest release: Sep 16, 2021
  • Number of updates: 72
  • Update frequency: every 43.6 days
  • Top authors: edckwt (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 7,156 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲23.48MB] [CPU: ▲67.79ms] 75% from 4 tests

A check of server-side resources used by Islamic Books by EDC
It is recommended to improve the following
  • Extra RAM: The extra memory usage must be under 5MB (currently 23.48MB on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /27.47 ▲24.01116.49 ▲78.19
Dashboard /wp-admin27.49 ▲24.19116.94 ▲66.73
Posts /wp-admin/edit.php27.49 ▲24.14131.02 ▲79.54
Add New Post /wp-admin/post-new.php27.49 ▲21.61157.67 ▲46.71
Media Library /wp-admin/upload.php27.49 ▲24.26127.14 ▲93.13

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 37 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_free_books_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Islamic Books by EDC
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲11414.81 ▲0.182.66 ▲0.9237.09 ▼5.89
Dashboard /wp-admin2,209 ▲185.83 ▲0.77100.35 ▼4.1281.38 ▲40.90
Posts /wp-admin/edit.php2,110 ▲212.01 ▼0.0436.82 ▼1.2336.07 ▲4.68
Add New Post /wp-admin/post-new.php1,683 ▲15020.21 ▼3.19713.36 ▲94.2557.87 ▲1.65
Media Library /wp-admin/upload.php1,400 ▲124.21 ▲0.05102.93 ▼0.5687.77 ▲34.52

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_free_books_widget
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/islamic-books/books-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/islamic-books/books-hook.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/islamic-books/index.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/islamic-books/books-functions.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
  • Screenshots: Please add descriptions for these screenshots #2, #3, #4 in islamic-books/assets to your readme.txt
The official readme.txt might help

islamic-books/index.php 85% from 13 tests

The principal PHP file in "Islamic Books by EDC" v. 2.11 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 177 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("islamic-books.php" instead of "index.php")

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 plugin174,376 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP11452308172,730
JavaScript581555976
Markdown1920467
CSS24222203

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity101.00
▷ Minimum class complexity101.00
▷ Maximum class complexity101.00
Average method complexity17.67
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
16 PNG files occupy 0.41MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png45.92KB20.80KB▼ 54.71%
images/download.png1.08KB1.35KB0.00%
i/download.png0.77KB0.92KB0.00%
screenshot-1.png102.72KB37.47KB▼ 63.52%
screenshot-2.png138.22KB46.55KB▼ 66.32%