84% media-ep

Code Review | Media EP

WordPress plugin Media EP scored84%from 54 tests.

About plugin

  • Plugin page: media-ep
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5
  • WordPress version: 6.3.1
  • First release: Jan 26, 2013
  • Latest release: Jan 27, 2013
  • Number of updates: 2
  • Update frequency: every 11.5 days
  • Top authors: weskoop (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /779 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.81ms] Passed 4 tests

Analyzing server-side resources used by Media EP
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.41 ▼5.05
Dashboard /wp-admin3.36 ▲0.0147.86 ▼13.79
Posts /wp-admin/edit.php3.41 ▲0.0547.55 ▼0.22
Add New Post /wp-admin/post-new.php5.94 ▲0.0589.25 ▼0.18
Media Library /wp-admin/upload.php3.28 ▲0.0537.81 ▲1.65
Media EP /wp-admin/options-general.php?page=media-ep3.2638.54

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
media_ep_key
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Media EP
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.19 ▼1.241.61 ▼0.2341.24 ▼3.77
Dashboard /wp-admin2,210 ▲194.89 ▼0.01108.08 ▼0.3742.33 ▼3.80
Posts /wp-admin/edit.php2,096 ▲72.04 ▲0.0739.34 ▲2.0036.08 ▼1.30
Add New Post /wp-admin/post-new.php1,522 ▼1122.97 ▼0.15591.10 ▼99.4962.73 ▲9.04
Media Library /wp-admin/upload.php1,392 ▲74.16 ▼0.0494.12 ▼6.4941.94 ▼3.18
Media EP /wp-admin/options-general.php?page=media-ep8982.0426.6645.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • media_ep_key

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/media-ep/media-ep.php:20

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (To configure the destination of your photoes and get your *secret url* — did we mention it's a secret? — Go to **Settings → Media EP**), #2 (Copy that URL into your favorite Twitter client (TweetBot or Twitteriffic work great))
Please take inspiration from this readme.txt

media-ep/media-ep.php Passed 13 tests

The principal PHP file in "Media EP" v. 1.0.1 is loaded by WordPress automatically on each request
65 characters long description:
A non-authenticating WordPress Media Endpoint for Twitter Clients

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected142 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17358142

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity1.92
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.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
1 PNG file occupies 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png54.01KB16.18KB▼ 70.04%