83% electric-studio-auto-expire-post

Code Review | Electric Studio Auto Post Expire

WordPress plugin Electric Studio Auto Post Expire scored83%from 54 tests.

About plugin

  • Plugin page: electric-studio-a...
  • Plugin version: 1.6.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8.1
  • WordPress version: 6.3.1
  • First release: Apr 1, 2011
  • Latest release: Feb 14, 2014
  • Number of updates: 71
  • Update frequency: every 14.8 days
  • Top authors: irvingswiftj (63.38%)Electric Studio (38.03%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /16,161 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.11MB] [CPU: ▼0.68ms] Passed 4 tests

An overview of server-side resources used by Electric Studio Auto Post Expire
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1040.15 ▲1.71
Dashboard /wp-admin3.41 ▲0.1144.86 ▼0.12
Posts /wp-admin/edit.php3.53 ▲0.1749.43 ▲3.81
Add New Post /wp-admin/post-new.php6.01 ▲0.1386.16 ▼8.10
Media Library /wp-admin/upload.php3.34 ▲0.1144.78 ▲13.50
Post Expiry /wp-admin/options-general.php?page=es_ape_options_page3.3131.42

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 40 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
es_ape_pt
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Electric Studio Auto Post Expire
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.26 ▼1.321.77 ▲0.0142.61 ▼1.68
Dashboard /wp-admin2,225 ▲404.94 ▼0.91110.57 ▲5.3636.96 ▼5.46
Posts /wp-admin/edit.php2,105 ▲162.08 ▲0.0841.37 ▼2.8135.27 ▲2.13
Add New Post /wp-admin/post-new.php1,667 ▲13420.55 ▼2.61684.06 ▲60.7669.66 ▲2.31
Media Library /wp-admin/upload.php1,398 ▲134.30 ▲0.0897.83 ▼6.7340.08 ▼5.46
Post Expiry /wp-admin/options-general.php?page=es_ape_options_page1,8111.8326.3231.92

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/electric-studio-auto-expire-post/electric-studio-auto-post-expire.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === electric-studio-auto-expire-post === )
  • Screenshots: These screenshots require images: #1 (The options menu), #2 (The added metabox to the edit post/page/attachment page)
Please take inspiration from this readme.txt

electric-studio-auto-expire-post/electric-studio-auto-post-expire.php 92% from 13 tests

"Electric Studio Auto Post Expire" version 1.6.10's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("electric-studio-auto-expire-post.php" instead of "electric-studio-auto-post-expire.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected1,008 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP1123257462
CSS32562326
JavaScript31147170
Sass11050

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity12.80
▷ Minimum class complexity5.00
▷ Maximum class complexity22.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods26
▷ Static methods623.08%
▷ Public methods2596.15%
▷ Protected methods00.00%
▷ Private methods13.85%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
30 PNG files occupy 0.45MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png218.56KB73.45KB▼ 66.39%
css/images/ui-bg_inset-hard_100_fcfdfd_1x100.png0.09KB0.09KB0.00%
css/smoothness/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
css/images/ui-icons_469bdd_256x240.png4.27KB4.11KB▼ 3.78%
css/images/ui-bg_flat_55_fbec88_40x100.png0.18KB0.08KB▼ 52.20%