84% disha-pages-wp

Code Review | Disha Pages for WordPress

WordPress plugin Disha Pages for WordPress scored84%from 54 tests.

About plugin

  • Plugin page: disha-pages-wp
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Mar 16, 2020
  • Latest release: Mar 17, 2020
  • Number of updates: 4
  • Update frequency: every 1.0 days
  • Top authors: dsha (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /486 total downloads

Benchmarks

Plugin footprint 83% 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.46MB] [CPU: ▼25.23ms] Passed 4 tests

An overview of server-side resources used by Disha Pages for WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.18 ▼0.5523.01 ▼23.43
Dashboard /wp-admin3.59 ▼0.0451.76 ▼15.82
Posts /wp-admin/edit.php3.70 ▲0.0274.64 ▲25.59
Add New Post /wp-admin/post-new.php4.88 ▼1.2744.11 ▼61.41
Media Library /wp-admin/upload.php3.51 ▲0.0236.97 ▼0.26

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
wpdisha_pages
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Disha Pages for WordPress: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲4314.47 ▲0.171.90 ▼0.1842.14 ▼3.59
Dashboard /wp-admin2,215 ▲355.57 ▼0.0592.98 ▲2.5276.58 ▲34.61
Posts /wp-admin/edit.php2,139 ▲422.05 ▲0.0043.96 ▲7.3948.21 ▲10.76
Add New Post /wp-admin/post-new.php1,555 ▲2223.44 ▲0.16753.93 ▲71.2557.31 ▼6.25
Media Library /wp-admin/upload.php1,432 ▲324.25 ▲0.04105.72 ▼3.0769.07 ▲21.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • wpdisha_pages
    • widget_theysaidso_widget
    • widget_recent-posts

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/disha-pages-wp/custom-template.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
6 plugin tags: embed, disha, one-pager, landing, page builder...

disha-pages-wp/disha-pages.php 92% from 13 tests

"Disha Pages for WordPress" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("disha-pages-wp.php" instead of "disha-pages.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected221 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP36322178
Markdown119035
SVG1018

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.50MB with 0.39MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
opengraph.png510.84KB115.40KB▼ 77.41%