79% post-author-ip

Code Review | Post Author IP

WordPress plugin Post Author IP scored79%from 54 tests.

About plugin

  • Plugin page: post-author-ip
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.7
  • WordPress version: 6.3.1
  • First release: Feb 15, 2018
  • Latest release: Jun 10, 2021
  • Number of updates: 7
  • Update frequency: every 173.1 days
  • Top authors: coffee2code (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /2,378 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.22ms] Passed 4 tests

An overview of server-side resources used by Post Author IP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0737.49 ▼0.36
Dashboard /wp-admin3.38 ▲0.0349.27 ▼13.22
Posts /wp-admin/edit.php3.49 ▲0.1348.30 ▼0.75
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.54 ▼6.56
Media Library /wp-admin/upload.php3.30 ▲0.0733.43 ▲1.54

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Post Author IP
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.44 ▲0.081.71 ▼0.0944.00 ▼1.79
Dashboard /wp-admin2,195 ▲215.56 ▼0.0996.06 ▲9.6642.33 ▲0.71
Posts /wp-admin/edit.php2,112 ▲122.00 ▼0.0139.63 ▼1.7236.00 ▼4.72
Add New Post /wp-admin/post-new.php1,548 ▲2023.59 ▲0.40682.74 ▲25.8868.43 ▲16.46
Media Library /wp-admin/upload.php1,400 ▼34.25 ▲0.0495.33 ▼2.0141.36 ▼0.27

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/post-author-ip/tests/phpunit/bootstrap.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/post-author-ip/tests/phpunit/bootstrap.php on line 29
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/post-author-ip/tests/phpunit/bootstrap.php on line 29

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
9 plugin tags: audit, coffee2code, ip, auditing, post...

post-author-ip/post-author-ip.php Passed 13 tests

The entry point to "Post Author IP" version 1.4 is a PHP file that has certain tags in its header comment area
82 characters long description:
Records the IP address of the original post author when a post first gets created.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin37,248 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JSON20036,257
PHP5330414795
Markdown3330112
JavaScript23431
Bourne Shell16221
CSS10018
XML10014

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity19.00
▷ Minimum class complexity7.00
▷ Maximum class complexity31.00
Average method complexity1.38
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods93
▷ Static methods2425.81%
▷ Public methods9197.85%
▷ Protected methods00.00%
▷ Private methods22.15%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants2
▷ Global constants2100.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
No PNG files were detected