84% ephemera-widget

Code Review | Ephemera Widget

WordPress plugin Ephemera Widget scored84%from 54 tests.

About plugin

  • Plugin page: ephemera-widget
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.8
  • WordPress version: 6.3.1
  • First release: Jul 7, 2017
  • Latest release: Jul 7, 2017
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: SergeyBiryukov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,872 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼0.88ms] Passed 4 tests

Analyzing server-side resources used by Ephemera Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.33 ▼2.29
Dashboard /wp-admin3.36 ▲0.0649.55 ▼0.03
Posts /wp-admin/edit.php3.41 ▲0.0647.66 ▲1.01
Add New Post /wp-admin/post-new.php5.94 ▲0.0692.21 ▲0.24
Media Library /wp-admin/upload.php3.28 ▲0.0534.79 ▼1.46

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_widget_ephemera
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Ephemera Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,881 ▲13513.60 ▼0.788.25 ▲6.5239.34 ▼8.84
Dashboard /wp-admin2,206 ▲184.85 ▼1.0198.75 ▼18.2538.67 ▼7.28
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0339.95 ▲2.7134.16 ▼0.55
Add New Post /wp-admin/post-new.php1,514 ▼1017.45 ▼5.79653.37 ▼43.5049.73 ▼5.45
Media Library /wp-admin/upload.php1,388 ▲34.18 ▼0.0195.68 ▼2.5540.38 ▼4.67

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_widget_ephemera
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ephemera-widget/inc/class-ephemera-widget.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ephemera-widget/ephemera-widget.php:15

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, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: media, widget, post formats

ephemera-widget/ephemera-widget.php Passed 13 tests

The principal PHP file in "Ephemera Widget" v. 1.0 is loaded by WordPress automatically on each request
69 characters long description:
Makes Twenty Fourteen's Ephemera Widget available in any other theme.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin225 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP23971215
JavaScript11110

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.32
Average class complexity18.00
▷ Minimum class complexity1.00
▷ Maximum class complexity35.00
Average method complexity4.78
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin