78% authorsure

Code Review | AuthorSure

WordPress plugin AuthorSure scored78%from 54 tests.

About plugin

  • Plugin page: authorsure
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9.1
  • WordPress version: 6.3.1
  • First release: Feb 13, 2012
  • Latest release: Aug 4, 2014
  • Number of updates: 54
  • Update frequency: every 16.7 days
  • Top authors: powerblogservice (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

1,000+ active /146,668 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.19MB] [CPU: ▼4.90ms] Passed 4 tests

An overview of server-side resources used by AuthorSure
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1537.43 ▼3.93
Dashboard /wp-admin3.52 ▲0.1845.92 ▼17.08
Posts /wp-admin/edit.php3.63 ▲0.2849.40 ▲3.25
Add New Post /wp-admin/post-new.php6.10 ▲0.2295.85 ▲6.74
Media Library /wp-admin/upload.php3.44 ▲0.2234.89 ▼1.85
AuthorSure /wp-admin/options-general.php?page=authorsure3.4047.27

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 46 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for AuthorSure
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.19 ▼1.101.91 ▲0.0540.96 ▼2.87
Dashboard /wp-admin2,210 ▲224.85 ▼0.96107.50 ▼7.0341.59 ▼0.90
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0540.23 ▲4.2233.56 ▼0.51
Add New Post /wp-admin/post-new.php1,536 ▲2222.74 ▲5.02625.35 ▼88.0558.39 ▼0.01
Media Library /wp-admin/upload.php1,395 ▲74.23 ▲0.0694.63 ▼4.8041.64 ▼3.36
AuthorSure /wp-admin/options-general.php?page=authorsure2,0572.5143.3244.97

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=authorsure
    • > User deprecated in wp-includes/functions.php+5737
    Function WP_User_Query was called with an argument that is deprecated since version 5.9.0! who is deprecated. Use capability instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/authorsure/main.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots lack descriptions #2, #3 in authorsure/assets to your readme.txt
You can look at the official readme.txt

authorsure/main.php 92% from 13 tests

The main PHP file in "AuthorSure" ver. 2.3 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("authorsure.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected1,479 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP9152311,399
CSS20041
JavaScript14039

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity39.29
▷ Minimum class complexity1.00
▷ Maximum class complexity129.00
Average method complexity3.13
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods126
▷ Static methods12599.21%
▷ Public methods9877.78%
▷ Protected methods00.00%
▷ Private methods2822.22%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
31 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/16px/flickr.png0.59KB0.50KB▼ 14.00%
images/16px/googleplus.png0.51KB0.48KB▼ 5.77%
images/24px/flickr.png2.31KB1.25KB▼ 46.09%
images/32px/pinterest.png1.06KB0.73KB▼ 31.16%
images/16px/youtube.png0.69KB0.58KB▼ 15.89%