10% post-author

Code Review | Post Author

WordPress plugin Post Author scored10%from 54 tests.

About plugin

  • Plugin page: post-author
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.8.1
  • WordPress version: 6.3.1
  • First release: Oct 27, 2009
  • Latest release: Feb 10, 2014
  • Number of updates: 39
  • Update frequency: every 40.3 days
  • Top authors: tzavdesign (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /45,001 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/post-author/post_author.php+361
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.68MB] [CPU: ▼56.22ms] Passed 4 tests

This is a short check of server-side resources used by Post Author
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.31 ▼1.166.50 ▼43.64
Dashboard /wp-admin2.33 ▼0.987.01 ▼45.48
Posts /wp-admin/edit.php2.33 ▼1.036.29 ▼43.98
Add New Post /wp-admin/post-new.php2.33 ▼3.565.70 ▼91.78
Media Library /wp-admin/upload.php2.33 ▼0.905.87 ▼29.48
Post author /wp-admin/options-general.php?page=post-author/post_author.php2.336.42

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: no new tables, 7 new options
New WordPress options
Post_Author_Options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Post Author
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,783 ▲2214.13 ▼0.221.93 ▲0.3242.69 ▲0.68
Dashboard /wp-admin2,187 ▲105.55 ▼0.0284.12 ▼9.3167.99 ▲26.69
Posts /wp-admin/edit.php2,107 ▲71.95 ▲0.0137.97 ▼2.6333.55 ▼2.97
Add New Post /wp-admin/post-new.php6,246 ▲4,72025.82 ▲2.84859.04 ▲192.80154.65 ▲84.66
Media Library /wp-admin/upload.php1,401 ▼24.12 ▲0.01100.09 ▼6.2071.64 ▲24.06
Post author /wp-admin/options-general.php?page=post-author/post_author.php1,2472.0223.0930.18

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/post-author/post_author.php+361
    Array and string offset access syntax with curly braces is deprecated
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • Post_Author_Options
    • widget_recent-posts
    • widget_theysaidso_widget

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
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=post-author/post_author.php
    • > Deprecated in wp-content/plugins/post-author/post_author.php+361
    Array and string offset access syntax with curly braces is deprecated
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=post-author/post_author.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=post-author/post_author.php
    • > User deprecated in wp-includes/functions.php+5453
    Function attribute_escape is deprecated since version 2.8.0! Use esc_attr() instead.

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 fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-author/post_author.php:1107

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, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === post-author === )
  • Screenshots: Please add images for these screenshots: #1 (This is what Post Author can look like on your blog.), #2 (Another example with Post Author at the top of the content.), #4 (The admin page of Post Author with the options available.), #5 (The post/page edit section with the Post Author plugin implement.)
You can take inspiration from this readme.txt

post-author/post_author.php 85% from 13 tests

The main file in "Post Author" v. 1.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 218 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("post-author.php" instead of "post_author.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,685 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP114981888
PO File6274349797

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.49
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%
Functions10
▷ Named functions10100.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
5 compressed PNG files occupy 0.11MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png47.57KB46.12KB▼ 3.05%
screenshot-3.png20.29KB19.08KB▼ 5.97%
screenshot-5.png5.23KB4.53KB▼ 13.35%
screenshot-4.png9.29KB9.09KB▼ 2.22%
screenshot-1.png32.72KB32.03KB▼ 2.10%