10% pataphysics

Code Review | Pataphysics

WordPress plugin Pataphysics scored10%from 54 tests.

About plugin

  • Plugin page: pataphysics
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-5.0
  • WordPress version: 6.3.1
  • First release: Jan 28, 2017
  • Latest release: Oct 27, 2018
  • Number of updates: 4
  • Update frequency: every 158.5 days
  • Top authors: rhumbs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /482 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/pataphysics/widget-date.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_Pataphysics_Date_Widget has a deprecated constructor

Server metrics [RAM: ▼1.92MB] [CPU: ▼54.86ms] Passed 4 tests

Analyzing server-side resources used by Pataphysics
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.399.32 ▼31.33
Dashboard /wp-admin2.09 ▼1.225.57 ▼41.60
Posts /wp-admin/edit.php2.09 ▼1.276.47 ▼46.73
Add New Post /wp-admin/post-new.php2.09 ▼3.806.30 ▼99.79
Media Library /wp-admin/upload.php2.09 ▼1.145.73 ▼30.53

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_wp_pataphysics_date_widget

Browser metrics Passed 4 tests

Pataphysics: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.20 ▼1.091.82 ▲0.0344.06 ▼0.05
Dashboard /wp-admin2,206 ▲185.82 ▲0.95102.51 ▼2.4437.34 ▼6.70
Posts /wp-admin/edit.php2,089 ▼32.05 ▼0.0138.81 ▼2.1934.84 ▼3.27
Add New Post /wp-admin/post-new.php1,542 ▲2223.19 ▲0.16637.98 ▼55.4548.60 ▼5.41
Media Library /wp-admin/upload.php1,388 ▲34.21 ▲0.0192.44 ▼13.7441.33 ▼6.66

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/pataphysics/widget-date.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_Pataphysics_Date_Widget has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_wp_pataphysics_date_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/pataphysics/pataphysics-shortcodes.php:76
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/pataphysics/pataphysics.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/pataphysics/widget-date.php:2

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 Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: widget, shortcode

pataphysics/pataphysics.php Passed 13 tests

The entry point to "Pataphysics" version 1.1 is a PHP file that has certain tags in its header comment area
78 characters long description:
Enable a shortcode which displays dates according to the Pataphysical Calendar

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
Good job! No executable or dangerous file extensions detected720 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2215560
PHP32836122
PO File12221
Markdown19017

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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