78% pathshala

Code Review | Pathshala

WordPress plugin Pathshala scored78%from 54 tests.

About plugin

  • Plugin page: pathshala
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 3, 2019
  • Latest release: Jul 7, 2021
  • Number of updates: 4
  • Update frequency: every 145.5 days
  • Top authors: emazharulislam (50%)engramium (50%)acepressbymicaore (50%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /439 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
Install script ran successfully

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

This is a short check of server-side resources used by Pathshala
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0637.68 ▲0.46
Dashboard /wp-admin3.36 ▲0.0544.86 ▼4.66
Posts /wp-admin/edit.php3.41 ▲0.0544.30 ▼1.40
Add New Post /wp-admin/post-new.php6.09 ▲0.2080.14 ▼9.13
Media Library /wp-admin/upload.php3.28 ▲0.0537.18 ▲4.57
Categories /wp-admin/edit-tags.php?taxonomy=pathshala_category&post_type=pathshala3.2732.31
All Courses /wp-admin/edit.php?post_type=pathshala3.3538.97
Add New Course /wp-admin/post-new.php?post_type=pathshala6.0877.98
Tags /wp-admin/edit-tags.php?taxonomy=pathshala_tag&post_type=pathshala3.2729.97

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Pathshala
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲15313.43 ▼0.928.38 ▲6.6137.64 ▼2.71
Dashboard /wp-admin2,237 ▲575.64 ▲0.0486.40 ▼2.4037.59 ▼8.75
Posts /wp-admin/edit.php2,139 ▲392.00 ▲0.0035.10 ▼5.4732.04 ▼0.74
Add New Post /wp-admin/post-new.php1,559 ▲3122.79 ▼0.13647.39 ▼32.6850.25 ▼10.57
Media Library /wp-admin/upload.php1,442 ▲454.23 ▲0.0596.52 ▼5.4342.60 ▼1.62
Categories /wp-admin/edit-tags.php?taxonomy=pathshala_category&post_type=pathshala1,3102.1227.4529.86
All Courses /wp-admin/edit.php?post_type=pathshala1,2903.2952.8125.42
Add New Course /wp-admin/post-new.php?post_type=pathshala6,28521.94927.1442.34
Tags /wp-admin/edit-tags.php?taxonomy=pathshala_tag&post_type=pathshala1,3132.1229.5326.81

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% 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 0% 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
Please fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/pathshala/public/partials/pathshala-public-display.php
    • > /wp-content/plugins/pathshala/admin/partials/pathshala-admin-display.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/pathshala/templates/single-pathshala.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pathshala/includes/class-post-type.php:239

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Requires at least: Version not formatted correctly
Please take inspiration from this readme.txt

pathshala/pathashala.php 92% from 13 tests

"Pathshala" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("pathshala.php" instead of "pathashala.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin463 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP14189572426
JavaScript3226925
CSS23812

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity2.62
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.42
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods31
▷ Static methods26.45%
▷ Public methods2374.19%
▷ Protected methods00.00%
▷ Private methods825.81%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin