84% inject-o-matic

Code Review | Inject-O-Matic

WordPress plugin Inject-O-Matic scored84%from 54 tests.

About plugin

  • Plugin page: inject-o-matic
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2.2
  • WordPress version: 6.3.1
  • First release: Jul 17, 2014
  • Latest release: May 22, 2015
  • Number of updates: 6
  • Update frequency: every 51.7 days
  • Top authors: baden03 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,575 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

An overview of server-side resources used by Inject-O-Matic
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.0444.19 ▼3.29
Dashboard /wp-admin3.61 ▲0.0454.77 ▼3.27
Posts /wp-admin/edit.php3.72 ▲0.0448.76 ▼5.79
Add New Post /wp-admin/post-new.php6.19 ▲0.0492.77 ▲0.28
Media Library /wp-admin/upload.php3.53 ▲0.0442.24 ▲2.79
Inject-O-Matic /wp-admin/options-general.php?page=inject-o-matic-options3.5029.74

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

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

Browser metrics Passed 4 tests

Inject-O-Matic: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.37 ▼0.211.82 ▼0.3045.89 ▲2.36
Dashboard /wp-admin2,199 ▲195.65 ▲0.03100.04 ▲11.0442.98 ▲1.64
Posts /wp-admin/edit.php2,104 ▲12.00 ▼0.0234.71 ▼10.2330.47 ▼6.19
Add New Post /wp-admin/post-new.php1,534 ▼1123.26 ▲0.14678.98 ▲51.2754.96 ▲3.96
Media Library /wp-admin/upload.php1,401 ▲14.19 ▼0.04103.89 ▲2.4443.22 ▲1.35
Inject-O-Matic /wp-admin/options-general.php?page=inject-o-matic-options9342.1827.4727.04

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 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/inject-o-matic/inject-o-matic.php:238

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: plugin-oven, footer, header, twinpictures, inject...

inject-o-matic/inject-o-matic.php 92% from 13 tests

The main PHP file in "Inject-O-Matic" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin175 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12561175

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
PNG images were not found in this plugin