93% wp-rest-theme-mod-endpoint

Code Review | Customizer Field EndPoint

WordPress plugin Customizer Field EndPoint scored 93% from 54 tests.

About plugin

  • Plugin page: wp-rest-theme-mod...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 5.8.1
  • First release: Jul 21, 2016
  • Latest release: Aug 2, 2016
  • Number of updates: 2
  • Update frequency: every 4.0 days
  • Top authors: vishalbasnet23 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 676 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.63MB] [CPU: ▼156.59ms] Passed 4 tests

Analyzing server-side resources used by Customizer Field EndPoint
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1341.03 ▲19.96
Dashboard /wp-admin3.07 ▲0.0141.19 ▲1.95
Posts /wp-admin/edit.php3.15 ▲0.0544.22 ▲2.36
Add New Post /wp-admin/post-new.php2.85 ▼2.5824.28 ▼631.16
Media Library /wp-admin/upload.php3.01 ▲0.0133.16 ▲0.48

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Customizer Field EndPoint
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,792 ▲19616.25 ▲0.3215.36 ▲6.8746.44 ▲3.55
Dashboard /wp-admin2,971 ▲375.90 ▼0.05136.48 ▼0.98110.45 ▼8.27
Posts /wp-admin/edit.php2,743 ▲42.69 ▲0.0162.42 ▼1.7285.48 ▼6.92
Add New Post /wp-admin/post-new.php1,680 ▲818.88 ▼0.24360.25 ▼32.01111.64 ▼6.15
Media Library /wp-admin/upload.php1,814 ▲15.01 ▲0.02145.20 ▼4.12119.73 ▲0.04

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 everything seems fine, this is not 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 items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-rest-theme-mod-endpoint/admin/partials/customizer-end-point-admin-display.php
    • > /wp-content/plugins/wp-rest-theme-mod-endpoint/public/partials/customizer-end-point-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Donate link: Invalid URI ("")
  • Plugin Name: Please specify the plugin name on the first line ( === wp-rest-theme-mod-endpoint === )
The official readme.txt might help

wp-rest-theme-mod-endpoint/customizer-end-point.php 85% from 13 tests

The main PHP script in "Customizer Field EndPoint" version 1.0.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-rest-theme-mod-endpoint.php" instead of "customizer-end-point.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected180 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12119530174
JavaScript24546
CSS2080

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 issues
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity1.29
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.08
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods25
▷ Static methods28.00%
▷ Public methods2080.00%
▷ Protected methods00.00%
▷ Private methods520.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin