84% post-admin-social-stats

Code Review | Post Admin Social Stats

WordPress plugin Post Admin Social Stats scored84%from 54 tests.

About plugin

  • Plugin page: post-admin-social...
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8
  • WordPress version: 6.3.1
  • First release: Dec 16, 2013
  • Latest release: Dec 20, 2013
  • Number of updates: 19
  • Update frequency: every 0.3 days
  • Top authors: GreatBlakes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,248 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.12ms] Passed 4 tests

Analyzing server-side resources used by Post Admin Social Stats
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0235.93 ▼4.08
Dashboard /wp-admin3.32 ▲0.0242.27 ▼6.42
Posts /wp-admin/edit.php3.37 ▲0.0143.54 ▼4.10
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.05 ▼17.89
Media Library /wp-admin/upload.php3.24 ▲0.0136.22 ▲3.47

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Post Admin Social Stats
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,090 ▲35519.75 ▲5.171.76 ▼0.0540.64 ▼8.06
Dashboard /wp-admin2,505 ▲31411.01 ▲6.09363.71 ▲255.1453.88 ▲10.11
Posts /wp-admin/edit.php2,094 ▲52.06 ▲0.0735.12 ▼8.6832.23 ▼1.89
Add New Post /wp-admin/post-new.php6,483 ▲4,96925.49 ▲8.051,083.06 ▲461.3048.91 ▼0.18
Media Library /wp-admin/upload.php1,387 ▼44.23 ▲0.0299.42 ▲1.5746.14 ▲2.98

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_permalink() in wp-content/plugins/post-admin-social-stats/postpage.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/post-admin-social-stats/post-admin-social-stats.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function home_url() in wp-content/plugins/post-admin-social-stats/dashboard.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

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:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
Please take inspiration from this readme.txt

post-admin-social-stats/post-admin-social-stats.php Passed 13 tests

Analyzing the main PHP file in "Post Admin Social Stats" version 1.0.6
62 characters long description:
Add social stats to the Edit Post page of the Wordpress admin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected124 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP32232121
CSS1103

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods2100.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/gearside.png1.80KB0.88KB▼ 51.22%