83% pokemojis

Code Review | PoKeMoJiS

WordPress plugin PoKeMoJiS scored83%from 54 tests.

About plugin

  • Plugin page: pokemojis
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 20, 2019
  • Latest release: May 11, 2020
  • Number of updates: 4
  • Update frequency: every 111.5 days
  • Top authors: arena (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /829 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

Analyzing server-side resources used by PoKeMoJiS
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▼0.0045.46 ▲4.25
Dashboard /wp-admin3.31 ▲0.0048.73 ▼6.18
Posts /wp-admin/edit.php3.36 ▲0.0048.10 ▼0.31
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.47 ▼5.52
Media Library /wp-admin/upload.php3.23 ▲0.0034.38 ▼0.08

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by PoKeMoJiS
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲2313.20 ▼1.181.29 ▼1.0141.14 ▼3.14
Dashboard /wp-admin2,206 ▲184.88 ▼0.98110.05 ▼0.2041.26 ▲0.95
Posts /wp-admin/edit.php2,089 ▼32.02 ▼0.0340.89 ▼0.4834.73 ▼2.82
Add New Post /wp-admin/post-new.php1,529 ▼1323.29 ▲5.02653.24 ▲5.5853.15 ▲0.82
Media Library /wp-admin/upload.php1,391 ▲34.25 ▲0.0798.17 ▼6.8441.08 ▼6.97

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

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
Everything seems fine, however this is by no means an exhaustive test

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
  • 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/pokemojis/PoKeMoJiS.php:44

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Contributors: Plugin contributors field is missing
  • Screenshots: Please add an image for screenshot #1 (none)
The official readme.txt might help

pokemojis/PoKeMoJiS.php 92% from 13 tests

The main PHP script in "PoKeMoJiS" version 1.0 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("pokemojis.php" instead of "PoKeMoJiS.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
There were no executable files found in this plugin41 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1111841

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.38
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods375.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin