84% content-recycler

Code Review | Content Recycler

WordPress plugin Content Recycler scored84%from 54 tests.

About plugin

  • Plugin page: content-recycler
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9.7
  • WordPress version: 6.3.1
  • First release: Jul 6, 2018
  • Latest release: Jul 6, 2018
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: japalekhin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /763 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 gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼6.55ms] Passed 4 tests

This is a short check of server-side resources used by Content Recycler
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0736.89 ▼2.43
Dashboard /wp-admin3.37 ▲0.0745.44 ▼1.69
Posts /wp-admin/edit.php3.49 ▲0.1344.50 ▲0.07
Add New Post /wp-admin/post-new.php5.95 ▲0.0685.93 ▼22.05
Media Library /wp-admin/upload.php3.30 ▲0.0635.50 ▼0.01
Content Recycler /wp-admin/tools.php?page=content-recycler3.2632.00

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Content Recycler
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.27 ▼1.321.65 ▼0.7344.54 ▼6.20
Dashboard /wp-admin2,204 ▲135.80 ▼0.08107.08 ▼2.5040.75 ▼6.71
Posts /wp-admin/edit.php2,093 ▲42.04 ▼0.0134.21 ▼0.7536.43 ▲2.56
Add New Post /wp-admin/post-new.php1,536 ▲723.41 ▲5.13687.03 ▲24.7862.50 ▲8.30
Media Library /wp-admin/upload.php1,395 ▲104.19 ▼0.0497.34 ▼12.0943.37 ▼0.78
Content Recycler /wp-admin/tools.php?page=content-recycler9002.0524.0331.21

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/content-recycler/recycler.php:177

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: custom post type, reuse, automatic, recycle, old posts...

content-recycler/recycler.php 92% from 13 tests

"Content Recycler" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("content-recycler.php" instead of "recycler.php")

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
There were no executable files found in this plugin272 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13421238
Markdown119034

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity2.71
▷ Minimum method complexity2.00
▷ Maximum method complexity4.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods10100.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions00.00%
▷ Anonymous functions11100.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin