83% islamsource

Code Review | IslamSource

WordPress plugin IslamSource scored83%from 54 tests.

About plugin

  • Plugin page: islamsource
  • Plugin version: 1.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1.0
  • WordPress version: 6.3.1
  • First release: Dec 16, 2014
  • Latest release: Feb 2, 2015
  • Number of updates: 44
  • Update frequency: every 1.1 days
  • Top authors: GregoryMorse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,059 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by IslamSource
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.30 ▲0.8356.55 ▲15.40
Dashboard /wp-admin4.15 ▲0.8449.89 ▲1.81
Posts /wp-admin/edit.php4.26 ▲0.9051.49 ▲0.83
Add New Post /wp-admin/post-new.php6.73 ▲0.8490.49 ▼7.66
Media Library /wp-admin/upload.php4.07 ▲0.8444.07 ▲5.63

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

A short overview of filesystem and database impact
Please fix the following
  • Total filesystem usage must be limited to 25MB (currently using 198.21MB)
Filesystem: 213 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for IslamSource
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.09 ▼0.281.62 ▼0.6843.40 ▼0.08
Dashboard /wp-admin2,192 ▲225.55 ▼0.1186.87 ▼15.0238.79 ▲0.16
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0339.98 ▼0.8535.19 ▼1.65
Add New Post /wp-admin/post-new.php1,526 ▼023.63 ▲0.47665.35 ▼26.9352.98 ▼0.93
Media Library /wp-admin/upload.php1,400 ▲34.17 ▼0.04102.45 ▼14.7545.18 ▼2.59

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • 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 | 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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/islamsource/IslamSourceWP.php:2374

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: quran, islam, phrases, calligraphy, verses

islamsource/IslamSourceWP.php 85% from 13 tests

"IslamSource" version 1.5.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 674 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("islamsource.php" instead of "IslamSourceWP.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin261,076 lines of code in 57 files:
LanguageFilesBlank linesComment linesLines of code
XML556772,633258,659
PHP119492,353
JavaScript12264

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity33.32
▷ Minimum class complexity1.00
▷ Maximum class complexity182.00
Average method complexity4.12
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes421.05%
▷ Concrete classes1578.95%
▷ Final classes00.00%
Methods156
▷ Static methods15196.79%
▷ Public methods156100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions71
▷ Named functions811.27%
▷ Anonymous functions6388.73%
Constants30
▷ Global constants00.00%
▷ Class constants30100.00%
▷ Public constants30100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected