78% php-everywhere

Code Review | PHP Everywhere

WordPress plugin PHP Everywhere scored78%from 54 tests.

About plugin

  • Plugin page: php-everywhere
  • Plugin version: 3.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.2
  • WordPress version: 6.3.1
  • First release: Sep 14, 2014
  • Latest release: Jan 11, 2022
  • Number of updates: 57
  • Update frequency: every 47.0 days
  • Top authors: alexander_fuchs (100%)

Code review

54 tests

User reviews

46 reviews

Install metrics

20,000+ active /249,162 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
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼1.25ms] Passed 4 tests

Analyzing server-side resources used by PHP Everywhere
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0941.99 ▼0.89
Dashboard /wp-admin3.39 ▲0.0951.57 ▼2.61
Posts /wp-admin/edit.php3.50 ▲0.1447.71 ▲3.21
Add New Post /wp-admin/post-new.php5.96 ▲0.0893.63 ▼4.72
Media Library /wp-admin/upload.php3.31 ▲0.0839.91 ▲5.38
PHP Everywhere Block /wp-admin/admin.php?page=php-everywhere-block-more-info3.2729.91
PHP Everywhere /wp-admin/options-general.php?page=php-everywhere-options3.2930.73
PHP Everywhere Upgrade /wp-admin/admin.php?page=php-everywhere-upgrade3.3136.02

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for PHP Everywhere
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,981 ▲24614.40 ▼0.181.75 ▼0.1046.82 ▲3.59
Dashboard /wp-admin2,368 ▲1775.84 ▲0.7497.86 ▼5.1536.82 ▼7.08
Posts /wp-admin/edit.php2,227 ▲1381.99 ▼0.0239.12 ▲1.0433.50 ▼3.61
Add New Post /wp-admin/post-new.php6,588 ▲5,05129.33 ▲6.28922.39 ▲239.9160.43 ▲3.60
Media Library /wp-admin/upload.php1,660 ▲2724.26 ▼0.1497.61 ▼2.2340.32 ▼5.96
PHP Everywhere Block /wp-admin/admin.php?page=php-everywhere-block-more-info8942.0225.8726.55
PHP Everywhere /wp-admin/options-general.php?page=php-everywhere-options1,0662.0523.2845.13
PHP Everywhere Upgrade /wp-admin/admin.php?page=php-everywhere-upgrade9092.0224.7636.48

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% 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 no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/php-everywhere/public/partials/php-everywhere-public-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/php-everywhere/public/partials/php-everywhere-block-public-display.php:26

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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
Attributes that need to be fixed:
  • Tags: There are too many tags (14 tag instead of maximum 10)
You can look at the official readme.txt

php-everywhere/phpeverywhere.php 85% from 13 tests

This is the main PHP file of "PHP Everywhere" version 3.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("php-everywhere.php" instead of "phpeverywhere.php")
  • Description: The description should be shorter than 140 characters (currently 298 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected644 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP16169630531
JavaScript373397
CSS241016

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity3.12
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods34
▷ Static methods25.88%
▷ Public methods2882.35%
▷ Protected methods00.00%
▷ Private methods617.65%
Functions7
▷ Named functions457.14%
▷ Anonymous functions342.86%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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