84% payamito-core

Code Review | Payamito Core

WordPress plugin Payamito Core scored84%from 54 tests.

About plugin

  • Plugin page: payamito-core
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8.1
  • WordPress version: 6.3.1
  • First release: Jan 8, 2022
  • Latest release: Jan 8, 2022
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: payamito (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /245 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 gracefully, with no errors

Server metrics [RAM: ▲1.48MB] [CPU: ▲8.75ms] Passed 4 tests

Server-side resources used by Payamito Core
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.97 ▲1.5053.32 ▲10.36
Dashboard /wp-admin4.79 ▲1.4865.63 ▲13.68
Posts /wp-admin/edit.php4.84 ▲1.4859.95 ▲12.12
Add New Post /wp-admin/post-new.php7.39 ▲1.5099.32 ▼1.18
Media Library /wp-admin/upload.php4.71 ▲1.4858.20 ▲22.34

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 143 new files
Database: no new tables, 7 new options
New WordPress options
payamito
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Payamito Core: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,942 ▲19613.63 ▼0.745.99 ▲4.1038.36 ▼7.87
Dashboard /wp-admin2,234 ▲465.86 ▲0.99105.15 ▼11.8149.66 ▲7.83
Posts /wp-admin/edit.php2,114 ▲252.02 ▲0.0136.40 ▲0.3540.77 ▲5.07
Add New Post /wp-admin/post-new.php1,531 ▲1723.21 ▲5.67694.14 ▼1.9562.59 ▲6.20
Media Library /wp-admin/upload.php1,416 ▲284.23 ▼0.01111.00 ▲12.2852.68 ▲10.12

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • payamito
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/payamito-core/admin/partials/payamito-admin-display.php
    • > /wp-content/plugins/payamito-core/public/partials/payamito-public-display.php

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
1 plugin tags: sms payamito

payamito-core/payamito.php 85% from 13 tests

The main PHP script in "Payamito Core" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("payamito-core.php" instead of "payamito.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin28,103 lines of code in 133 files:
LanguageFilesBlank linesComment linesLines of code
PHP1013,5411,97814,501
Sass1595934,837
CSS62804864,068
JavaScript71,2654013,995
PO File2329417700
SVG2002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity22.45
▷ Minimum class complexity1.00
▷ Maximum class complexity152.00
Average method complexity6.27
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes71
▷ Abstract classes22.82%
▷ Concrete classes6997.18%
▷ Final classes00.00%
Methods289
▷ Static methods5117.65%
▷ Public methods27996.54%
▷ Protected methods00.00%
▷ Private methods103.46%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/lib/codestar-framework/assets/images/checkerboard.png2.29KB2.54KB0.00%