10% content-repeater

Code Review | Content Repeater - Custom Posts Simplified

WordPress plugin Content Repeater - Custom Posts Simplified scored 10% from 53 tests.

About plugin

  • Plugin page: content-repeater
  • Plugin version: 1.1.13
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-5.6.2
  • WordPress version: 5.8.1
  • First release: Mar 6, 2019
  • Latest release: Jun 5, 2021
  • Number of updates: 50
  • Update frequency: every 16.4 days
  • Top authors: db0112358 (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 998 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/content-repeater/includes/functions.php+88
    Undefined index: page

Server metrics [RAM: ▼1.51MB] [CPU: ▼311.32ms] Passed 4 tests

An overview of server-side resources used by Content Repeater - Custom Posts Simplified
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.11 ▼0.727.01 ▼23.24
Dashboard /wp-admin2.13 ▼0.929.04 ▼41.28
Posts /wp-admin/edit.php2.13 ▼0.977.63 ▼31.14
Add New Post /wp-admin/post-new.php2.13 ▼3.307.85 ▼1,144.37
Media Library /wp-admin/upload.php2.13 ▼0.877.57 ▼28.49

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 77 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Content Repeater - Custom Posts Simplified
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,804 ▲22416.89 ▲1.3614.15 ▲4.8546.57 ▲2.61
Dashboard /wp-admin2,956 ▲1105.89 ▲0.10134.29 ▲2.67101.63 ▼5.63
Posts /wp-admin/edit.php2,732 ▲262.70 ▲0.0166.99 ▼1.5191.29 ▼3.37
Add New Post /wp-admin/post-new.php1,670 ▲1917.40 ▲0.12357.49 ▼4.47113.94 ▲5.52
Media Library /wp-admin/upload.php1,795 ▲235.01 ▲0.01140.38 ▼21.89106.93 ▼12.04

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
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/content-repeater/includes/functions.php+88
    Undefined index: page

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 take a closer look at the following
  • 7× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/content-repeater/templates/before-after.php
    • > /wp-content/plugins/content-repeater/templates/products.php
    • > /wp-content/plugins/content-repeater/templates/flipboxes.php
    • > /wp-content/plugins/content-repeater/templates/testimonials.php
    • > /wp-content/plugins/content-repeater/templates/portfolio.php
    • > /wp-content/plugins/content-repeater/templates/portals.php
    • > /wp-content/plugins/content-repeater/templates/coupons.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Rptr_Class' not found in wp-content/plugins/content-repeater/includes/rename-fields.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/content-repeater/includes/duplicate-post.php:106
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/content-repeater/includes/publish-and-new.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Rptr_Class' not found in wp-content/plugins/content-repeater/includes/export-import-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/content-repeater/includes/conditional.php:113

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)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
Please take inspiration from this readme.txt

content-repeater/content-repeater.php Passed 13 tests

The entry point to "Content Repeater - Custom Posts Simplified" version 1.1.13 is a PHP file that has certain tags in its header comment area
83 characters long description:
A tool to quickly set up custom content types and display them in interesting ways.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected14,731 lines of code in 66 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript231,1467648,590
PHP243935233,378
CSS112441222,079
Sass2275262
HTML22022248
LESS1115152
SVG21014
Ruby1208

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity26.62
▷ Minimum class complexity1.00
▷ Maximum class complexity156.00
Average method complexity3.95
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods75
▷ Static methods5573.33%
▷ Public methods75100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions55
▷ Named functions3461.82%
▷ Anonymous functions2138.18%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/paypal-button-buy-now.png23.34KB8.82KB▼ 62.20%
assets/photoswipe/default-skin/default-skin.png0.53KB0.72KB0.00%
assets/img/payment-cards.png12.33KB4.95KB▼ 59.83%