84% in-page-script

Code Review | In Page Script

WordPress plugin In Page Script scored84%from 54 tests.

About plugin

  • Plugin page: in-page-script
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3
  • WordPress version: 6.3.1
  • First release: Sep 7, 2015
  • Latest release: Sep 7, 2015
  • Number of updates: 10
  • Update frequency: N/A
  • Top authors: svincoll4 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,741 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.96ms] Passed 4 tests

A check of server-side resources used by In Page Script
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.23 ▼2.21
Dashboard /wp-admin3.32 ▲0.0145.49 ▼1.96
Posts /wp-admin/edit.php3.37 ▲0.0148.13 ▲1.67
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.36 ▼9.34
Media Library /wp-admin/upload.php3.24 ▲0.0135.85 ▲4.73
In Page Script /wp-admin/options-general.php?page=in-page-script3.2530.07

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for In Page Script
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.24 ▼1.131.69 ▼0.1338.97 ▼11.59
Dashboard /wp-admin2,213 ▲224.85 ▼0.06104.11 ▼0.7538.50 ▼8.94
Posts /wp-admin/edit.php2,093 ▲11.96 ▼0.0439.27 ▼1.3334.78 ▼0.85
Add New Post /wp-admin/post-new.php1,536 ▲323.26 ▲0.17664.69 ▲59.5253.98 ▼2.22
Media Library /wp-admin/upload.php1,395 ▲74.29 ▲0.05100.52 ▲1.6743.48 ▼0.82
In Page Script /wp-admin/options-general.php?page=in-page-script8262.0322.3723.38

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/in-page-script/in-page-script.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/in-page-script/setting-page.php:3

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)
No browser errors were detected

Optimizations

Plugin configuration 97% 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
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (Screenshot)
The official readme.txt might help

in-page-script/in-page-script.php Passed 13 tests

The principal PHP file in "In Page Script" v. 0.1 is loaded by WordPress automatically on each request
129 characters long description:
This plugin helps to add scripts into the header (before close tag </HEAD>) or the footer (before close tag </BODY>).

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected178 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP26531178

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.75
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity4.30
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected