90% media-library-internet-archive-content

Code Review | Internet Archive Media Library

WordPress plugin Internet Archive Media Library scored90%from 54 tests.

About plugin

  • Plugin page: media-library-int...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.4
  • WordPress version: 6.3.1
  • First release: Nov 25, 2016
  • Latest release: Jun 22, 2020
  • Number of updates: 7
  • Update frequency: every 185.6 days
  • Top authors: yknivag (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,233 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.35ms] Passed 4 tests

An overview of server-side resources used by Internet Archive Media Library
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.27 ▲3.23
Dashboard /wp-admin3.34 ▼0.0045.86 ▼16.74
Posts /wp-admin/edit.php3.39 ▲0.0450.52 ▲4.51
Add New Post /wp-admin/post-new.php5.94 ▲0.0582.26 ▼3.10
Media Library /wp-admin/upload.php3.26 ▲0.0435.27 ▼0.79
Internet Archive Media Library /wp-admin/upload.php?page=internet-archive-media-library-management3.2432.30

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
iaml_prefix
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Internet Archive Media Library
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲4313.74 ▼0.611.62 ▼0.3940.77 ▼7.29
Dashboard /wp-admin2,221 ▲474.95 ▼0.5794.71 ▲0.4840.08 ▲0.75
Posts /wp-admin/edit.php2,128 ▲282.36 ▲0.3740.47 ▲2.3836.43 ▲1.45
Add New Post /wp-admin/post-new.php1,551 ▲2523.41 ▼0.11684.59 ▲22.7137.51 ▼19.66
Media Library /wp-admin/upload.php1,429 ▲294.56 ▲0.27101.29 ▼5.3846.19 ▼0.75
Internet Archive Media Library /wp-admin/upload.php?page=internet-archive-media-library-management1,0752.3834.6543.12

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 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 everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: archiveorg media library, archiveorg mapping, internet archive, internet archive mapping, internet archive media library...

media-library-internet-archive-content/internet-archive-media-library.php 92% from 13 tests

Analyzing the main PHP file in "Internet Archive Media Library" version 1.0.2
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("media-library-internet-archive-content.php" instead of "internet-archive-media-library.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected760 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS233155406
PHP37457263
JavaScript1131348
Markdown115043

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity8.50
▷ Minimum method complexity3.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.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
No PNG images were found in this plugin