73% islamic-archive-for-islam-and-hinduism

Code Review | Islamic Archive For Islam and Hinduism

WordPress plugin Islamic Archive For Islam and Hinduism scored73%from 54 tests.

About plugin

  • Plugin page: islamic-archive-f...
  • Plugin version: 1.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jun 1, 2016
  • Latest release: Dec 4, 2022
  • Number of updates: 16
  • Update frequency: every 148.6 days
  • Top authors: edckwt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /884 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.86ms] Passed 4 tests

An overview of server-side resources used by Islamic Archive For Islam and Hinduism
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0645.03 ▲4.13
Dashboard /wp-admin3.41 ▲0.1077.18 ▲18.43
Posts /wp-admin/edit.php3.44 ▲0.0945.03 ▼6.41
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.02 ▼17.29
Media Library /wp-admin/upload.php3.25 ▲0.0241.55 ▲8.12
Islamic Archive For Islam and Hinduism /wp-admin/options-general.php?page=Islamic_Archive_For_Islam_and_Hinduism3.2533.18

Server storage [IO: ▲0.17MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 48 new files
Database: 1 new table, 10 new options
New tables
wp_opicifh_categories
New WordPress options
widget_recent-comments
opicifh_cronjobtime
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
opicifh_version
opicifh_source
opicifh_language
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Islamic Archive For Islam and Hinduism
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8413.22 ▼1.161.94 ▲0.3447.63 ▲1.89
Dashboard /wp-admin2,214 ▲294.80 ▼1.04104.22 ▼2.0040.52 ▼0.30
Posts /wp-admin/edit.php2,094 ▲82.06 ▲0.0435.00 ▼3.3432.93 ▼2.40
Add New Post /wp-admin/post-new.php1,541 ▲818.10 ▼5.05583.48 ▼67.4161.04 ▲3.20
Media Library /wp-admin/upload.php1,393 ▲54.16 ▼0.0699.08 ▼3.3641.24 ▼3.49
Islamic Archive For Islam and Hinduism /wp-admin/options-general.php?page=Islamic_Archive_For_Islam_and_Hinduism8422.0223.8129.20

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_opicifh_categories
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • widget_theysaidso_widget
    • opicifh_source
    • opicifh_cronjobtime
    • widget_recent-posts
    • opicifh_language
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • opicifh_version
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 25× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant IFHLIB - assumed 'IFHLIB' (this will throw an Error in a future version of PHP) in wp-content/plugins/islamic-archive-for-islam-and-hinduism/load.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function opicifh_icon_logo() in wp-content/plugins/islamic-archive-for-islam-and-hinduism/views/options.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'app_ifh_helpers' not found in wp-content/plugins/islamic-archive-for-islam-and-hinduism/lib/html_ifh_helper.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'app_ifh_controlers' not found in wp-content/plugins/islamic-archive-for-islam-and-hinduism/controllers/options_ifh_controller.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/islamic-archive-for-islam-and-hinduism/lib/opic_ifh_cronjob.php:14
    • > PHP Warning
      Use of undefined constant IFHDS - assumed 'IFHDS' (this will throw an Error in a future version of PHP) in wp-content/plugins/islamic-archive-for-islam-and-hinduism/load.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/islamic-archive-for-islam-and-hinduism/lib/ifh_pluginlifeciclye.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'app_ifh_controlers' not found in wp-content/plugins/islamic-archive-for-islam-and-hinduism/controllers/language_ifh_controller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'html_ifh_helper' not found in wp-content/plugins/islamic-archive-for-islam-and-hinduism/views/categories.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function opicifh_icon_logo() in wp-content/plugins/islamic-archive-for-islam-and-hinduism/views/language.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes: The official readme.txt is a good inspiration

islamic-archive-for-islam-and-hinduism/index.php 92% from 13 tests

The main PHP file in "Islamic Archive For Islam and Hinduism" ver. 1.3.3 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("islamic-archive-for-islam-and-hinduism.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,171 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP232531061,111
CSS12048
JavaScript10112

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity11.80
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity3.16
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods50
▷ Static methods24.00%
▷ Public methods4080.00%
▷ Protected methods48.00%
▷ Private methods612.00%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants20
▷ Global constants20100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
19 PNG files occupy 0.13MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
style/images/icons/language.png6.49KB3.29KB▼ 49.38%
style/images/flags/rus.png0.17KB0.17KB0.00%
style/images/flags/tel.png0.63KB1.03KB0.00%
style/images/flags/spa.png0.52KB0.88KB0.00%
style/images/icons/options.png4.81KB2.97KB▼ 38.29%