10% sunray-author-manager

Code Review | Sunray Author Manager

WordPress plugin Sunray Author Manager scored10%from 54 tests.

About plugin

  • Plugin page: sunray-author-man...
  • Plugin version: 1.0.16
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2.3
  • WordPress version: 6.3.1
  • First release: Jun 23, 2017
  • Latest release: Mar 12, 2020
  • Number of updates: 38
  • Update frequency: every 26.1 days
  • Top authors: mattkressel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,692 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/sunray-author-manager/sunray-author-manager.php+1581
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼0.29MB] [CPU: ▼7.93ms] Passed 4 tests

This is a short check of server-side resources used by Sunray Author Manager
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.385.23 ▼37.14
Dashboard /wp-admin3.37 ▲0.0745.80 ▼2.02
Posts /wp-admin/edit.php3.43 ▲0.0850.51 ▲4.34
Add New Post /wp-admin/post-new.php5.97 ▲0.09100.14 ▲7.66
Media Library /wp-admin/upload.php3.29 ▲0.0742.50 ▲3.10
Settings /wp-admin/admin.php?page=sam-options-settings3.2635.17
Books /wp-admin/edit.php?post_type=sam_book3.3539.37
Stories /wp-admin/edit.php?post_type=sam_story3.3531.39

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 40 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
sam_version
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Sunray Author Manager
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,946 ▲21113.68 ▼0.725.64 ▲3.9039.60 ▼5.15
Dashboard /wp-admin2,257 ▲655.03 ▲0.07110.21 ▼12.8441.24 ▼0.27
Posts /wp-admin/edit.php2,103 ▲112.28 ▲0.2747.49 ▲12.9436.05 ▲2.57
Add New Post /wp-admin/post-new.php1,566 ▲3218.49 ▼4.62599.45 ▼103.3659.00 ▲5.30
Media Library /wp-admin/upload.php1,436 ▲544.29 ▲0.0499.24 ▲1.5243.60 ▼1.43
Settings /wp-admin/admin.php?page=sam-options-settings1,1191.9624.1937.07
Books /wp-admin/edit.php?post_type=sam_book1,2332.2033.4732.95
Stories /wp-admin/edit.php?post_type=sam_story1,2362.2037.2430.96

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • sam_version
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

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
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 add_action() in wp-content/plugins/sunray-author-manager/sunray-author-manager.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: bibliography, author, slider, writer, cover...

sunray-author-manager/sunray-author-manager.php Passed 13 tests

This is the main PHP file of "Sunray Author Manager" version 1.0.16, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
55 characters long description:
A versatile plugin for writers to highlight their work.

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
Everything looks great! No dangerous files found in this plugin4,770 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4876832,175
PHP13251201,150
CSS510113463
Markdown31110261
Sass2275260
HTML1111151
LESS1135150
JSON400134
SVG11013
Ruby1208
make1305

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions35
▷ Named functions35100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
7 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
css/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
css/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
css/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
css/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%