84% avoid-repeating-posts

Code Review | Avoid Repeating Posts

WordPress plugin Avoid Repeating Posts scored84%from 54 tests.

About plugin

  • Plugin page: avoid-repeating-p...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 18, 2017
  • Latest release: Jan 29, 2022
  • Number of updates: 9
  • Update frequency: every 170.9 days
  • Top authors: ChrisBAshton (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /1,550 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 successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Avoid Repeating Posts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.80 ▲0.50
Dashboard /wp-admin3.31 ▲0.0154.35 ▲3.07
Posts /wp-admin/edit.php3.36 ▲0.0149.86 ▲0.23
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.80 ▼8.08
Media Library /wp-admin/upload.php3.23 ▲0.0036.11 ▲2.10

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Avoid Repeating Posts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,784 ▲2314.17 ▼0.181.83 ▲0.1445.29 ▼2.97
Dashboard /wp-admin2,198 ▲215.57 ▼0.1093.83 ▲2.2544.15 ▼1.91
Posts /wp-admin/edit.php2,097 ▼62.03 ▲0.0638.02 ▲2.8635.71 ▲2.84
Add New Post /wp-admin/post-new.php1,526 ▼023.32 ▼0.05668.18 ▼51.0651.37 ▼2.42
Media Library /wp-admin/upload.php1,394 ▼64.10 ▼0.11101.35 ▼8.7845.94 ▼2.62

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

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
Good news, no errors were detected

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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/avoid-repeating-posts/avoid-repeating-posts.php:10

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 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
5 plugin tags: avoid duplicate, avoid displaying, avoid multiple, avoid repeating, dont repeat

avoid-repeating-posts/avoid-repeating-posts.php Passed 13 tests

"Avoid Repeating Posts" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
81 characters long description:
Avoid showing same WordPress post in multiple loops. Fresh content in every loop.

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
Success! There were no dangerous files found in this plugin13 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14713

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions2
▷ Named functions2100.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
PNG images were not found in this plugin