94% social-archiver

Code Review | Social Archiver

WordPress plugin Social Archiver scored 94% from 54 tests.

About plugin

  • Plugin page: social-archiver
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.4
  • WordPress version: 5.8.1
  • First release: Feb 9, 2016
  • Latest release: Feb 9, 2016
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: gallib (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 408 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▼138.76ms] Passed 4 tests

Analyzing server-side resources used by Social Archiver
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.01 ▲0.2940.71 ▲15.81
Dashboard /wp-admin3.30 ▲0.2449.61 ▼1.78
Posts /wp-admin/edit.php3.35 ▲0.2449.88 ▲1.12
Add New Post /wp-admin/post-new.php5.60 ▲0.1694.38 ▼570.19
Media Library /wp-admin/upload.php3.19 ▲0.1847.63 ▲16.57
Add New /wp-admin/post-new.php?post_type=sa_twitter3.3554.70
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=sa_twitter3.1830.26
All Tweets /wp-admin/edit.php?post_type=sa_twitter3.2333.81
Social Archiver /wp-admin/options-general.php?page=social_archiver3.1631.74

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 25 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Social Archiver
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,752 ▲15615.81 ▲0.2011.93 ▲1.5252.46 ▲1.87
Dashboard /wp-admin3,009 ▲755.90 ▼0.13141.70 ▼17.78118.62 ▲2.52
Posts /wp-admin/edit.php2,784 ▲452.69 ▼0.0071.38 ▲0.7497.98 ▲1.71
Add New Post /wp-admin/post-new.php1,712 ▲2915.57 ▼3.18432.31 ▲35.52136.66 ▲27.01
Media Library /wp-admin/upload.php1,793 ▼145.02 ▼0.01196.31 ▲22.01144.59 ▲21.83
Add New /wp-admin/post-new.php?post_type=sa_twitter3,1469.14233.52159.64
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=sa_twitter1,8712.5163.0582.66
All Tweets /wp-admin/edit.php?post_type=sa_twitter1,4502.6168.6983.52
Social Archiver /wp-admin/options-general.php?page=social_archiver1,2172.0960.0991.54

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/social-archiver/social-archiver.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/social-archiver/uninstall.php:5

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)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (All your publication are saved in a custom post type, allowing you to easily find them.) image not found
The official readme.txt might help

social-archiver/social-archiver.php Passed 13 tests

"Social Archiver" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
21 characters long description:
Save your social life

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
No dangerous file extensions were detected1,032 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP15251464882
PO File13744123
JSON20017
Markdown19010

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity11.33
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods62
▷ Static methods46.45%
▷ Public methods5080.65%
▷ Protected methods1117.74%
▷ Private methods11.61%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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.11MB with 0.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png112.83KB53.86KB▼ 52.26%