83% allthecontent

Code Review | AllTheContent

WordPress plugin AllTheContent scored 83% from 54 tests.

About plugin

  • Plugin page: allthecontent
  • Plugin version: 0.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3.2
  • WordPress version: 5.8.1
  • First release: Apr 13, 2015
  • Latest release: Feb 19, 2020
  • Number of updates: 29
  • Update frequency: every 61.3 days
  • Top authors: allthecontent (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,387 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.20MB] [CPU: ▼142.45ms] Passed 4 tests

Analyzing server-side resources used by AllTheContent
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.0431.97 ▼4.52
Dashboard /wp-admin3.36 ▲0.3051.07 ▲11.56
Posts /wp-admin/edit.php3.41 ▲0.3048.66 ▲3.18
Add New Post /wp-admin/post-new.php5.65 ▲0.2290.43 ▼570.90
Media Library /wp-admin/upload.php3.24 ▲0.2433.46 ▲2.43
Error log /wp-admin/admin.php?page=atc-admin-error-log-page3.2134.32
Category mapping /wp-admin/admin.php?page=atc-admin-catmap-page3.2135.39
Tools /wp-admin/admin.php?page=atc-admin-tools-page3.2030.60
Settings /wp-admin/admin.php?page=atc-admin-settings-page3.2029.21
Importation log /wp-admin/admin.php?page=atc-admin-page3.2127.15

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 33 new files
Database: 3 new tables, 1 new option
New tables
wp_atc_log_importation
wp_atc_category_mapping
wp_atc_log_error
New WordPress options
atc_db_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for AllTheContent
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,757 ▲16115.91 ▲0.308.23 ▼0.6446.16 ▼1.82
Dashboard /wp-admin3,027 ▲936.19 ▼0.04154.99 ▲9.63110.02 ▲2.45
Posts /wp-admin/edit.php2,793 ▲542.73 ▲0.0269.93 ▼0.7191.04 ▲1.99
Add New Post /wp-admin/post-new.php1,750 ▼1,83317.96 ▲3.09381.05 ▼90.90111.83 ▲5.00
Media Library /wp-admin/upload.php1,864 ▲575.06 ▲0.02168.24 ▲20.76112.60 ▼1.35
Error log /wp-admin/admin.php?page=atc-admin-error-log-page1,2302.0957.6864.32
Category mapping /wp-admin/admin.php?page=atc-admin-catmap-page1,2772.0654.4566.04
Tools /wp-admin/admin.php?page=atc-admin-tools-page1,1222.1055.2673.76
Settings /wp-admin/admin.php?page=atc-admin-settings-page1,1152.1255.8379.60
Importation log /wp-admin/admin.php?page=atc-admin-page1,3092.0966.3373.49

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=atc-admin-settings-page
    • > Notice in wp-content/plugins/allthecontent/admin/pages/SettingsPage.php+245
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/allthecontent/includes/ATCApi.php
    • > /wp-content/plugins/allthecontent/atcml-format.example.php
  • 18× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: content in wp-content/plugins/allthecontent/atcml-format.example.php on line 52
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/allthecontent/atcml-format.example.php on line 27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function getATCImgPageLogo() in wp-content/plugins/allthecontent/admin/pages/templates/error-log.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function getATCImgPageLogo() in wp-content/plugins/allthecontent/admin/pages/templates/importation-log.php:3
    • > PHP Notice
      Undefined variable: content_text in wp-content/plugins/allthecontent/atcml-format.example.php on line 24
    • > PHP Notice
      Undefined variable: captions in wp-content/plugins/allthecontent/atcml-format.example.php on line 27
    • > PHP Notice
      Undefined variable: captions in wp-content/plugins/allthecontent/atcml-format.example.php on line 32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function getATCImgPageLogo() in wp-content/plugins/allthecontent/admin/pages/templates/category-mapping.php:3
    • > PHP Notice
      Undefined variable: captions in wp-content/plugins/allthecontent/atcml-format.example.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function getATCImgPageLogo() in wp-content/plugins/allthecontent/admin/pages/templates/category-mapping-addcatmap.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 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
7 plugin tags: import, importer, content, fresh content, feeds...

allthecontent/index.php 92% from 13 tests

This is the main PHP file of "AllTheContent" version 0.1.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("allthecontent.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin2,201 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP245588042,116
Markdown239067
CSS13018

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity15.11
▷ Minimum class complexity1.00
▷ Maximum class complexity65.00
Average method complexity2.49
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods170
▷ Static methods127.06%
▷ Public methods13076.47%
▷ Protected methods00.00%
▷ Private methods4023.53%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
3 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo-reuters.png9.67KB6.13KB▼ 36.61%
images/logo-atc-wp.png17.77KB0.75KB▼ 95.77%
images/logo-atc-wp-white.png17.56KB0.60KB▼ 96.58%