93% embed-namasha

Code Review | Namasha

WordPress plugin Namasha scored 93% from 54 tests.

About plugin

  • Plugin page: embed-namasha
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.8
  • WordPress version: 5.8.1
  • First release: Oct 27, 2018
  • Latest release: Oct 27, 2018
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: rayoweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 889 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼146.00ms] Passed 4 tests

Server-side resources used by Namasha
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0124.30 ▲1.20
Dashboard /wp-admin3.06 ▼0.0034.77 ▼7.12
Posts /wp-admin/edit.php3.12 ▲0.0134.10 ▲1.22
Add New Post /wp-admin/post-new.php5.43 ▼0.0173.01 ▼576.73
Media Library /wp-admin/upload.php3.01 ▲0.0024.22 ▼1.34

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Namasha
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲5316.02 ▼0.057.00 ▲1.0474.92 ▼0.00
Dashboard /wp-admin2,936 ▲436.13 ▼0.01113.96 ▼14.83166.33 ▼5.58
Posts /wp-admin/edit.php2,746 ▲33.22 ▼0.1465.43 ▼0.20137.01 ▼0.45
Add New Post /wp-admin/post-new.php3,749 ▲4319.20 ▲0.08448.85 ▲13.27162.10 ▼4.57
Media Library /wp-admin/upload.php1,757 ▲55.53 ▼0.04132.77 ▼8.39184.45 ▲3.40

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/embed-namasha/namasha.php:16

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #1, #2 in embed-namasha/assets to your readme.txt
You can take inspiration from this readme.txt

embed-namasha/namasha.php 85% from 13 tests

The main PHP script in "Namasha" version 0.1 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("embed-namasha.php" instead of "namasha.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
There were no executable files found in this plugin310 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PO File14141111
PHP12915102
JavaScript16280
CSS11017

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions8
▷ Named functions8100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
js/namasha-logo.png3.92KB1.98KB▼ 49.55%