78% content-mirror

Code Review | Content Mirror

WordPress plugin Content Mirror scored78%from 54 tests.

About plugin

  • Plugin page: content-mirror
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9
  • WordPress version: 6.3.1
  • First release: Jan 10, 2012
  • Latest release: May 1, 2014
  • Number of updates: 32
  • Update frequency: every 26.3 days
  • Top authors: stratoponjak (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /5,041 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▲0.35ms] Passed 4 tests

An overview of server-side resources used by Content Mirror
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0644.09 ▲0.83
Dashboard /wp-admin3.36 ▲0.0649.96 ▲2.55
Posts /wp-admin/edit.php3.47 ▲0.1252.91 ▲3.54
Add New Post /wp-admin/post-new.php5.94 ▲0.0690.33 ▼5.50
Media Library /wp-admin/upload.php3.28 ▲0.0540.44 ▲5.00

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Content Mirror
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.10 ▼0.181.80 ▼0.2444.86 ▼1.74
Dashboard /wp-admin2,195 ▲185.61 ▼0.0591.73 ▲0.9341.61 ▲2.75
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0338.78 ▼3.8536.86 ▼1.96
Add New Post /wp-admin/post-new.php1,526 ▼023.57 ▼0.01647.43 ▼32.8063.29 ▲14.11
Media Library /wp-admin/upload.php1,400 ▼34.19 ▼0.0298.96 ▼7.6142.95 ▼4.99

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • content_mirror_save_error_plugin_error
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/content-mirror/index.php
  • 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/content-mirror/content-mirror.php:29

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


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (This is an example of how to use shortcodes instead.) image missing
The official readme.txt is a good inspiration

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

The main PHP script in "Content Mirror" version 1.2 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 239 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected474 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity39.00
▷ Minimum class complexity39.00
▷ Maximum class complexity39.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/edit.png2.27KB1.54KB▼ 32.16%
images/content_mirror.png13.71KB8.40KB▼ 38.73%
images/delete.png1.60KB1.34KB▼ 15.93%